Scripting API reference
get_script_apiRetrieve the live axross Python API as JSON to write scripts: call with an empty names list for an index, then request only the functions, classes, or types you need.
Instructions
Describe the axross Python API that scripts can call, as JSON from the live code. Use when: writing a script: names=[] gives the index (about 30 KB), then the names you need. Instead: read_script to see an existing script. Requires: --mcp-allow-scripts (stdio only); not in paranoid mode. Behavior: read-only; runs no code. An unknown name fails. Time limit: 15 s. Returns: {schema_version, module, legend, rules, errors, groups (names by topic), functions, classes, backend_protocol, types}; the index has functions and classes empty, names fills them for those names.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_script_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | No | Function, class or type names (from the index's groups), e.g. ['open_url', 'FileItem']; each comes with the types it uses. [] gives the index alone (start there); omit names only for the whole API, some 200 KB. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | No | ||
| types | Yes | ||
| errors | No | ||
| groups | Yes | ||
| legend | No | what each field means | |
| module | Yes | ||
| classes | Yes | [] for the index | |
| functions | Yes | [] for the index (names=[]) | |
| schema_version | Yes | ||
| backend_protocol | No |