Skip to main content
Glama

mcp_script_run

Execute a script file from a specified remote agent's scripts folder, pass optional args, and return its exit code and output.

Instructions

Run a file from agent's scripts/ folder and return {name, exit_code, output}. On a Raspberry Pi a .py runs with the agent's Python and anything else with sh; output is its stdout (first 2 KB) and a run over 15 s is killed. On a Pico or ESP32 the file is exec'd in-process: output is what its read(*args) returns, or its result, and exit_code is 1 if it raised. args are letters and digits only.

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": {
      "agent": "<agent>",
      "name": "<name>"
    },
    "name": "mcp_script_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNo
nameYes
agentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.30

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description fully carries the burden: it discloses execution semantics per platform, output capture rules, the first 2 KB truncation, the 15 s kill timeout, exit-code behavior, and the args character restriction. This is unusually complete behavioral context.

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

Conciseness5/5

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

The description is dense but front-loaded, starting with the core action and return value before platform-specific behavior. Every sentence adds useful operational detail without wasted prose.

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

Completeness4/5

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

Given no output schema and no annotations, the description covers the return shape, timeout, output limits, platform-dependent execution, and error/exit-code behavior. It does not discuss side effects, permissions, or behavior when the file is missing, which would improve completeness for an execution tool.

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 0%, so the description must compensate. It explains that `agent` selects the device whose scripts/ folder is used, `name` is the file to run, and `args` are restricted to letters and digits and are passed to the script (explicitly to read(*args) on Pico/ESP32). It stops short of fully specifying how args are passed on the Raspberry Pi path.

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 description states a specific verb and resource: run a file from the agent's scripts/ folder, and it names the output shape {name, exit_code, output}. It is clearly distinguishable from sibling tools like mcp_script_read, mcp_script_write, and mcp_script_list.

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

Usage Guidelines3/5

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

The purpose implies when to use it, but the description does not explicitly say when to choose this over siblings such as reading or writing scripts, nor does it state prerequisites or exclusions. It gives platform-specific execution details but no routing guidance.

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