Skip to main content
Glama
axross-headless-mcp

axross-headless-mcp

Run script

run_script
Destructive

Execute a saved Python script with the axross API imported when file tools lack needed logic; pass arguments, set a timeout, and capture stdout, stderr, exit status, and globals.

Instructions

Run a saved Python script in a child process with the axross API imported. Use when: a job needs logic the file tools lack; write it with write_script after get_script_api. Instead: run_backend_command on a remote host. Requires: --mcp-allow-scripts (stdio only); not in paranoid mode. Behavior: destructive - runs with the server user's full rights, outside the MCP root. stdin is empty: API prompts raise NonInteractiveError unless passed assume_yes=True. Over 1 MiB of output fails the call (its effects stay). Time limit: timeout, then the run is killed and returns timed_out true with the output so far. Returns: {name, exit (negative: killed by that signal), timed_out, duration_ms, stdout, stderr, namespace_keys (globals left)}, plus {error_type, error, traceback} after an exception.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "run_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNoCommand-line arguments, the script's sys.argv[1:], e.g. ['--dry-run', 'docs']; no NUL characters.
nameYesThe script's name, from list_scripts: letters, digits, '_' and '-', at most 80 characters, without '.py', e.g. 'disk_report'.
timeoutNoWall-clock limit for the run in seconds.

Output Schema

NameRequiredDescriptionDefault
exitYes
nameYes
errorNo
stderrYes
stdoutYes
timed_outYes
tracebackNo
error_typeNo
duration_msYes
namespace_keysYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.15.181

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare destructiveHint, openWorldHint, non-idempotent and readOnlyHint=false, and the description corroborates rather than repeats them by explaining why it is destructive: full server-user rights, execution outside the MCP root, and effects persisting after a failed call. It adds non-obvious traits the annotations cannot express — empty stdin causing NonInteractiveError without assume_yes, the 1 MiB output ceiling, and the kill-on-timeout semantics. It does not cover exit-code conventions in prose, but the return block handles that.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Labeled clauses (Use when / Instead / Requires / Behavior / Returns) front-load the decision-relevant facts and use no filler. The Returns block restates a shape that the output schema already defines, which is the one mildly redundant element in an otherwise dense, well-ordered definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-risk execution tool with a gating flag (--mcp-allow-scripts), a paranoid-mode exclusion, an interactive-prompt pitfall, output-size limits and timeout semantics, every operational hazard an agent needs before calling is stated. An output schema exists, so the return description is a bonus rather than a crutch.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema for 'timeout' by stating that expiry kills the run and returns timed_out with partial output. The 'args' and 'name' parameters are left to their already-detailed schema entries, which is the correct division of labor.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names a specific verb and resource ('Run a saved Python script in a child process with the axross API imported') and pins down the execution environment, which separates it from general command execution. An agent can distinguish it from run_backend_command and run_backend_script without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit use condition ('a job needs logic the file tools lack'), names the prerequisite toolchain (write_script after get_script_api), and names the alternative plus the condition that selects it ('run_backend_command on a remote host'). That is the full when / when-not / instead pattern.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.