Skip to main content
Glama

audit_code

audit_code
Read-onlyIdempotent

Call before running code you or another agent generated, or before delivering a repo as done: static audit returns a verdict plus line-numbered findings.

Input Schema

NameRequiredDescriptionDefault
codeNoSource code to audit (single file or snippet).
pathNoOptional file name for the snippet.
filesNoSeveral files instead of one snippet.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description's added value is telling the agent this is a static analysis that returns a verdict and line-numbered findings rather than executing anything. It does not mention limits such as the 40-file cap or what a negative verdict implies, which keeps it from a 5.

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?

A single sentence, front-loaded with the call trigger and followed by the payoff, with no filler. Every clause contributes either timing or expected output.

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?

With no output schema, the description correctly spends its words on what comes back (verdict plus line-numbered findings), which is the key gap for this tool. It stops short of characterizing the verdict values or any size constraints, but nothing essential to invoking it 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 each parameter is already documented in the schema, and the description adds no syntax or format detail beyond implying that either a snippet or a set of files is accepted. Baseline 3 is appropriate when the schema carries the parameter burden.

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 ('static audit' of code) and the shape of the result ('a verdict plus line-numbered findings'). It is clearly distinct from check_command or check_package by subject matter, but it never names a sibling or explicitly contrasts scope.

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?

Gives concrete trigger conditions: before running code you or another agent generated, or before delivering a repo as done. That is a clear usage context, but there are no when-not conditions and no explicit alternative named for adjacent cases.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.