Skip to main content
Glama

Test Python tool

test_python_tool

Run a Python tool you made, once, as the editor's Test button runs it (the same sandbox and limits, the variables a person gave it), with args_json as its arguments. Answers its exit code, output and errors; a run that fails answers as an error, to fix with create_python_tool and test again. Use it to prove the tool before you say it works.

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": "test_python_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesThe Python tool's name
args_jsonNoJSON object of the arguments, e.g. '{"path": "sales.csv"}'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: same sandbox and limits as the editor, the person-supplied variables, and that it answers exit code, output, and errors, with failed runs surfacing as errors. It does not disclose whether a run has side effects on persisted state or counts against quotas, which matters given openWorldHint=true.

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?

Three sentences, front-loaded with the core action and reference model, then return behavior, then the usage rule. Dense but every clause carries information; the parenthetical could be tightened slightly.

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?

With no output schema, the description carries the return contract itself — exit code, output, errors, and error-on-failure semantics — plus the sandbox/limits context and the remediation loop. An agent has everything needed to call it and interpret results.

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

Parameters3/5

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

Schema coverage is 100%, so both parameters are already documented. The description restates that args_json supplies the arguments and implies they mirror what a human would pass, but adds no format or edge-case semantics beyond the schema's own example.

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?

States a specific verb and resource ("Run a Python tool you made, once") and anchors it to a concrete mental model — the editor's Test button with the same sandbox and limits. It is clearly distinguishable from create_python_tool, which is named as the fix path.

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

Usage Guidelines4/5

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

Gives an explicit usage directive: "Use it to prove the tool before you say it works," plus a follow-up loop (fix with create_python_tool, test again). It does not say when not to use it or how it differs from update_python_tool, so a little inference remains.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.