Operações da suíte
suite.input.string
Pede um texto à pessoa, como o getstring do LISP.
- Programa: Todos os programas
- Tipo de ação: Lê o desenho
- Só leitura
- Desde a versão 2027.0.0-beta.6
Com spaces, o espaço é letra e só o Enter termina. Esc cancela o pedido.
Parâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
message | string | null | Não | A pergunta mostrada na linha de comando. |
spaces | boolean | Não | O espaço é letra (só o Enter termina). |
Erros
| Código | JSON-RPC | O que significa |
|---|---|---|
cancelled | -32012 | Cancelado (Esc, desconexão ou fechamento). |
busy | -32006 | O BadBit está abrindo ou salvando um arquivo; tente de novo daqui a pouco. |
Exemplo
MCP
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"arguments": {
"message": "Block name:",
"spaces": true
},
"operation": "suite.input.string"
},
"name": "badbit_call_operation"
}
}Python
Python
import badbit
result = badbit.suite.input.string(message="Block name:", spaces=True)LISP
LISP
(badbit-call "suite.input.string" '(("message" . "Block name:") ("spaces" . T)))JSON-RPC
JSON
{
"id": 1,
"jsonrpc": "2.0",
"method": "badbit/call",
"params": {
"arguments": {
"message": "Block name:",
"spaces": true
},
"operation": "suite.input.string"
}
}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": {
"message": {
"default": null,
"description": "The question shown on the command line.",
"maxLength": 500,
"type": [
"string",
"null"
]
},
"spaces": {
"default": false,
"description": "A space is part of the text (only Enter ends it).",
"type": "boolean"
}
},
"type": "object"
}Resultado (saída)
JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"text": {
"description": "The text (the one typed, or the result as text for the command line).",
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
}