Operações da suíte
suite.command.list
Lista os comandos do programa, com os atalhos e o que cada um faz.
- Programa: Todos os programas
- Tipo de ação: Lê o desenho
- Só leitura
- Desde a versão 2027.0.0-beta.6
Procura no registro de comandos pelas palavras do nome, do atalho ou do resumo. Com detail, cada comando vem com a descrição de automação: as perguntas que faz, na ordem (com as letras das opções entre colchetes, as mesmas do AutoCAD em inglês), e a operação tipada equivalente, quando existe. Em páginas: passe o next_cursor como cursor para a próxima.
Parâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
cursor | string | null | Não | Continuar depois deste item: passe o next_cursor da página anterior. |
detail | boolean | null | Não | Mais informação por item (todas as propriedades; nos comandos, as perguntas). |
limit | integer | null | Não | Número máximo de itens nesta página. |
query | string | null | Não | Palavras a procurar no nome, no atalho ou no resumo (vazio: todos). |
Erros
| Código | JSON-RPC | O que significa |
|---|---|---|
invalid_params | -32602 | Os parâmetros não seguem o esquema ou uma regra da operação. |
Exemplo
MCP
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"arguments": {
"query": "circle"
},
"operation": "suite.command.list"
},
"name": "badbit_call_operation"
}
}Python
Python
import badbit
result = badbit.suite.command.list(query="circle")LISP
LISP
(badbit-call "suite.command.list" '(("query" . "circle")))JSON-RPC
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "badbit/call",
"params": {
"arguments": {
"query": "circle"
},
"operation": "suite.command.list"
}
}Esquema completo
JSON Schema 2020-12, com as descrições em inglês.
Parâmetros (entrada)
JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"cursor": {
"default": null,
"description": "Continue after this item: pass the next_cursor of the previous page.",
"type": [
"string",
"null"
]
},
"detail": {
"default": null,
"description": "More information per item (all properties; for commands, the questions).",
"type": [
"boolean",
"null"
]
},
"limit": {
"default": null,
"description": "Maximum number of items in this page.",
"format": "uint32",
"maximum": 500,
"minimum": 1,
"type": [
"integer",
"null"
]
},
"query": {
"default": null,
"description": "Words to look for in the name, alias or summary (empty: all).",
"type": [
"string",
"null"
]
}
},
"type": "object"
}Resultado (saída)
JSON
{
"$defs": {
"Command": {
"properties": {
"aliases": {
"description": "The short names typed on the command line.",
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"description": "Object identifier (32 hexadecimal digits), or command identifier in the command list.",
"type": "string"
},
"name": {
"description": "Name (of the layer, of the system variable or of the command, depending on the operation).",
"type": "string"
},
"note": {
"description": "Note about the command (opens a window, not used by automation…).",
"type": [
"string",
"null"
]
},
"operation": {
"description": "The typed operation that does the same.",
"type": [
"string",
"null"
]
},
"prompts": {
"description": "The questions the command asks, in order (options in brackets with the letters to type).",
"items": {
"type": "string"
},
"type": "array"
},
"summary": {
"description": "What it does.",
"type": "string"
}
},
"required": [
"id",
"name",
"aliases",
"summary"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"commands": {
"description": "The commands.",
"items": {
"$ref": "#/$defs/Command"
},
"type": "array"
},
"next_cursor": {
"description": "Pass as cursor to get the next page (absent: this was the last one).",
"type": [
"string",
"null"
]
},
"total": {
"description": "How many items match the filters (in all pages).",
"format": "uint",
"minimum": 0,
"type": "integer"
}
},
"required": [
"commands",
"total"
],
"type": "object"
}