Suite operations
suite.input.string
Asks the person for a text, like getstring in LISP.
- Program: All programs
- Type of action: Reads the drawing
- Read only
- Since version 2027.0.0-beta.6
With spaces, a space is part of the text and only Enter ends it. Esc cancels the request.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
message | string | null | No | The question shown on the command line. |
spaces | boolean | No | A space is part of the text (only Enter ends it). |
Errors
| Code | JSON-RPC | Meaning |
|---|---|---|
cancelled | -32012 | Cancelled (Esc, disconnection or closing). |
busy | -32006 | BadBit is busy opening or saving a file; try again shortly. |
Example
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"
}
}Full schema
JSON Schema 2020-12.
Parameters (input)
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"
}Result (output)
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"
}