Skip to main content
Glama

rescue_python_snippet

Runs the original and repaired Python snippets in isolated WebAssembly sandboxes to verify fixes and provide before/after evidence for student code.

Instructions

Actually run a student's original and AI-repaired Python snippet in separate disposable WebAssembly child processes. Use after generating a minimal fix so the answer can show before/after evidence instead of an unverified suggestion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
test_casesNoOptional stdin/output examples. Omit expected_stdout when only a successful run is required.
original_codeYesThe user's original Python code
candidate_codeYesThe minimally repaired Python code generated by the agent
reported_errorNoOptional error text supplied by the user

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden, and it delivers: execution happens in isolated, 'disposable' (ephemeral) WebAssembly child processes, with the original and repaired snippet run separately. It does not mention timeouts, resource limits, or failure handling, but the security/isolation model — the most important behavioral trait for a code-execution tool — is clearly disclosed.

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?

Two sentences with zero filler. The action verb and sandbox mechanism are front-loaded in the first sentence, and the second sentence earns its place by giving the specific usage condition. Every word contributes information an agent needs for selection and invocation.

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?

For moderate complexity (4 parameters, a nested test_cases object, no output schema), the description covers purpose, when to use it, and the execution/security model, while the schema covers all parameter semantics. The only real gap is response/return format, which matters more 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.

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3; the description reinforces the mapping between 'original and AI-repaired' and the original_code/candidate_code parameters but adds no detail beyond the schema. Parameter-level semantics, including the nested test_cases structure, are already fully documented by the schema itself.

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 names a specific verb ('run') and resource (the student's original plus AI-repaired Python snippet) and states the defining mechanism: 'separate disposable WebAssembly child processes.' It also differentiates itself by stressing actual execution for before/after evidence, which is distinct from the siblings that probe environments, inspect GitHub projects, or reproduce whole projects.

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?

It explicitly states when to invoke the tool: 'Use after generating a minimal fix so the answer can show before/after evidence instead of an unverified suggestion.' This is a clear trigger condition with a rationale, though it stops short of naming alternatives or giving explicit when-not-to-use guidance.

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