Skip to main content
Glama
pico-bay

pico-bay

Official

Run Python on a board

pico_python_run
Destructive

Execute Python code or run a file on a connected MicroPython or CircuitPython board, with timeout handling to interrupt long-running programs.

Instructions

Run a Python file as main or execute Python code. Provide exactly one of path or code. This can change any state accessible to code on the board. A program still running after timeout_ms is interrupted with Ctrl-C.

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": {
      "board_id": "<board_id>"
    },
    "name": "pico_python_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNo
pathNoPath on the board filesystem, relative to its root.
board_idYesStable board UID returned by pico_boards_list, or its current serial device path.
timeout_msNoExecution timeout in milliseconds (default 30000, max 600000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already declare destructiveHint=true and readOnlyHint=false, and the description reinforces this with 'This can change any state accessible to code on the board,' scoping the blast radius. It adds genuinely new operational behavior in describing the Ctrl-C interruption of a program that outlives timeout_ms, though it says nothing about permissions or what happens to state on interruption.

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?

Three short sentences, front-loaded with the action, followed by the invocation constraint and then the risk and timeout semantics. Every sentence carries distinct information with no redundancy.

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

Completeness3/5

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

For a destructive execution tool with no output schema, the definition covers risk and timeout behavior well but never indicates what the agent gets back — stdout, exit status, or how an interrupted run is reported. That omission matters because there is no output schema to fall back on.

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 75%, and the description fills a real gap by stating the mutual-exclusivity rule between path and code that the schema only expresses weakly via a single required field. It also frames timeout_ms in terms of the Ctrl-C consequence, adding meaning beyond the schema's 'Execution timeout in milliseconds' note.

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

Purpose4/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 Python file as __main__ or execute Python code,' which is clearly distinct from file-authoring siblings like pico_file_write and lifecycle siblings like pico_board_reset. It does not explicitly name an alternative tool, so it falls short of the top score, but the purpose is unambiguous.

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?

'Provide exactly one of path or code' is a usage constraint that tells the agent how to invoke it, which is useful. However, there is no guidance on when to prefer this over writing a file and resetting the board, or when to use pico_board_interrupt instead of relying on the timeout, leaving the routing decision implied.

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