Skip to main content
Glama

compile_zig

Format Zig source code with the official Zig formatter to resolve style inconsistencies and standardize files across selected Zig versions.

Instructions

Format Zig code using the official Zig formatter

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesZig source code to format
zig_versionNoZig version to use for formatting (default: 0.15.2)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.2-i

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden, and it discloses almost nothing: no statement that formatting preserves semantics (unlike the name's 'compile' implication), no idempotency, no error behavior for invalid Zig, no output format. It does at least clarify the operation is formatting rather than compiling, which is the one behavioral correction present.

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?

A single short sentence with zero filler, front-loading the action and the resource. It is efficient, though its brevity shades into under-specification rather than pure concision.

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 two-parameter, fully documented schema with no output schema, the description is minimally viable: it identifies the operation and the formatter used. It leaves the compile-vs-format naming ambiguity unresolved and says nothing about what the tool returns or how errors surface.

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 'code' and the enumerated 'zig_version' (with its default) are already fully documented in the schema. The description adds no syntax, size-limit, or version-selection guidance beyond that, so the baseline 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 and resource ('Format Zig code') plus the mechanism ('official Zig formatter'), which distinguishes it from analyze_zig, get_zig_docs, and suggest_fix, none of which format. The only friction is that the tool name 'compile_zig' implies compilation while the description says formatting, which could momentarily confuse an agent matching name to behavior.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no exclusions, and no routing to alternatives such as suggest_fix when code needs semantic changes rather than reformatting. Usage is only inferable from the purpose statement itself.

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