Skip to main content
Glama

minimize

Shrink a Python module while preserving behavior by running sandboxed tests; reverts to the original if tests fail.

Instructions

Return a smaller version of a Python module with identical behavior.

The rewrite (Nemotron) is pre-checked (Jev) and then run against tests in a sandbox. Tests must import from a module named target. Without tests, tests are generated. A rewrite that changes behavior is rejected and the original is returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
repoNo
testsNo
findingsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so well. It discloses the validation pipeline (pre-check, sandbox execution against tests), the requirement that tests import from a module named `target`, automatic test generation when tests are absent, and the rejection-and-return-original fallback for behavior-changing rewrites.

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 appropriately sized and front-loaded: the core purpose comes first, followed by the operational workflow and fallback behavior. Every sentence adds useful information about how the tool works, with no wasted preamble.

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?

Given the lack of annotations, output schema, and schema descriptions, the description is only moderately complete. It explains the core behavior and validation fallback well, but it omits parameter semantics for most inputs and does not describe the return shape beyond saying a smaller version or the original is returned.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for four undocumented parameters. It partially explains the `tests` parameter through the testing workflow and mentions the `target` module requirement, but it does not explain `code`, `repo`, or `findings` at all, leaving most parameter semantics unclear.

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: return a smaller version of a Python module with identical behavior. This is clear enough for an agent to understand the tool's core purpose. However, it does not explicitly distinguish this tool from siblings such as prove_equivalent or verify_lean, so it falls short of the top score.

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?

Usage is implied by the purpose statement and the description of the rewrite/test/reject workflow, but there is no explicit when-to-use guidance, no exclusion conditions, and no mention of sibling alternatives. The agent can infer that this tool is for minimization requests, but the description does not help choose between it and related tools.

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