Skip to main content
Glama

code_write

Generate boilerplate code (tests, mocks, stubs, configs) that matches a reference file's style and structure, and write it directly to disk without using frontier model tokens.

Instructions

Generates boilerplate code (tests, mocks, stubs, configs) matching the patterns of a reference file. Can write directly to disk without consuming frontier output tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYesDescription of what code to generate
modelNoOptional model override (or 'auto' to select the best available writer model)
providerNoOptional provider override (gemini, groq, openai, deepseek, anthropic, ollama, openrouter)
target_pathNoOptional path where generated code should be written directly on disk
reference_pathYesPath to reference file whose conventions, style, and structure should be replicated

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It usefully reveals that the tool can write directly to disk and bypasses frontier token consumption, but it does not disclose potential overwrites, permission requirements, or what happens when target_path is omitted. Some behavioral context is present, but important side-effect risks remain unmentioned.

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, no filler, with the core purpose first and the key differentiator second. Every clause adds value: what is generated, how, and a side benefit that matters for tool selection.

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?

For a tool with 5 parameters and no output schema, the description is reasonably complete, but it leaves notable gaps: the default behavior when target_path is absent, whether existing files are overwritten, and how generated code is returned when not writing to disk. These are material to correct invocation and not covered elsewhere.

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 does not add much beyond the schema, though it reinforces that reference_path drives style replication and target_path enables disk writes. Since the schema already documents all five parameters, no significant compensation is needed.

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 states a specific verb ('Generates') and resource ('boilerplate code') plus the defining mechanism ('matching the patterns of a reference file'). It is clearly distinct from sibling tools bulk_read and get_available_models, leaving no ambiguity about the tool's function.

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?

The description clearly implies the intended context: generating boilerplate while referencing an existing file, and offers a concrete benefit ('without consuming frontier output tokens'). It does not explicitly name alternatives or exclusions, but the use case is transparent enough that an agent can decide when to invoke it.

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