Skip to main content
Glama

Self-Contained Python Script, CLI & Parser Code Synthesizer

synthesize_python_automation_code
Read-onlyIdempotent

Generate PEP 8-compliant, self-contained Python 3 automation scripts, parsers, and CLI utilities from functional specifications, with type hints, docstrings, and inline tests.

Instructions

Synthesizes PEP 8 compliant, self-contained Python 3 scripts, data parsers, and CLI utilities complete with type hints, docstrings, and inline assertion tests. Use when generating a standalone Python automation script or parser from a functional specification; for summarizing existing documentation or codebases into executive bullet points, use summarize_technical_document instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'prompt' ('dependency_policy' defaults to 'stdlib_only'), supports '?demo=true' or L402 (300 sats), and returns HTTP 400 if invalid.

Input Schema

NameRequiredDescriptionDefault
promptYesFunctional specification, input/output formats, and edge cases for the Python script.
dependency_policyNoAllowed library dependencies in generated code; defaults to 'stdlib_only' when omitted.

Output Schema

NameRequiredDescriptionDefault
modelYesCode synthesis model executed ('gemini-4-argon').
outputYesComplete Python 3 source code with inline verification assertions.
successYesTrue when code synthesis succeeded.
stdlib_onlyYesTrue if the generated script requires zero third-party pip packages.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.3

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds substantial operational context on top: stateless edge call, 32 KB payload cap, 60 RPM limit, ?demo=true bypass, L402 payment of 300 sats, and HTTP 400 on invalid input. This is exactly the kind of rate-limit/auth/payload detail annotations cannot express.

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?

Front-loaded with the capability, then usage/routing, then operational constraints in a single compact paragraph with no filler. The final sentence is dense with four separate constraints (size, rate, payment, error code) packed together, which slightly hurts scanability.

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?

An output schema exists, so return-value description is unnecessary, and the description still covers purpose, routing, dependency policy, payload limits, payment, and failure behavior. Nothing an agent needs to invoke this correctly is missing.

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 both parameters (including the enum values and the 'stdlib_only' default) are already fully documented in the input schema. The description only restates the prompt argument and the dependency_policy default, adding no format or syntax detail beyond the schema; baseline 3 applies.

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 ('Synthesizes') and a precisely scoped resource: PEP 8 compliant, self-contained Python 3 scripts, data parsers, and CLI utilities with type hints, docstrings, and inline tests. It also names the sibling it is not (summarize_technical_document), so an agent can separate this from documentation-summarization tools without opening a schema.

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?

Explicitly gives the triggering condition ('generating a standalone Python automation script or parser from a functional specification') and routes the summarization case to summarize_technical_document. It stops short of addressing the nearest functional alternative, execute_python_sandbox (generate vs. run), which is the confusion most likely to occur in this tool set.

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

Deploy Server

Other Tools