Skip to main content
Glama

execute

Run async Python snippets that await local tools.* operations, batching many file or command actions into one call and returning results.

Instructions

Run an async Python snippet that can await tools.* to batch many local operations in one call.

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": {
      "code": "<code>"
    },
    "name": "execute"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesAsync Python body. await tools.read_file({'Path': '/abs'}) and return a value.
yield_time_msNoHow long to wait before returning an execution_id.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the key mechanism (async body that can await tools.*), which is genuinely non-obvious and useful, but says nothing about the execution_id return path, the fact that this runs arbitrary code, timeout/cancellation behavior, or output size limits.

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?

A single front-loaded sentence with no filler; the capability and its rationale (batching in one call) are delivered immediately.

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?

An output schema exists and parameters are fully described, so return values needn't be explained. However, for an arbitrary-code-execution tool with no annotations, the description leaves the async lifecycle (execution_id, polling, cancellation) and safety expectations unaddressed.

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, including the await tools.read_file example and the execution_id semantics of yield_time_ms. The description's mention of awaiting tools.* largely restates what the schema already says, so the baseline of 3 applies.

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?

States a specific verb ("Run") and resource ("async Python snippet") plus the distinguishing capability that it can await tools.* and batch local operations. That separates it from plain shell execution, though it never names run_command or the individual file tools it could replace.

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?

"batch many local operations in one call" implies the condition for using it (many operations, one round-trip), but no explicit when-not guidance or named alternative is given. The yield/poll lifecycle implied by the yield_time_ms parameter and the poll_execution/cancel_execution siblings is not explained at all.

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