Skip to main content
Glama

audit_code

Audit source code before delivering or running it. Flags remote code execution (curl | bash), data exfiltration of environment variables or credential files, reverse shells, destructive commands, hidden base64 payloads, hard-coded secrets (AWS, OpenAI, Stripe, GitHub, database URLs), install-time hooks, typo-squatted package names and unsafe patterns such as shell=True, pickle.loads or TLS verification turned off. Nothing is executed; the audit is static text analysis. Returns a verdict (pass/warn/review/block), a safe_to_deliver flag and findings with line numbers. Each valid API call uses one credit; every key starts with 1,000 free calls; the limit is 20 calls per minute per key. On HTTP 400, fix the input; on 401, fix the API key; on 402, stop and resolve credits/payment; on 429, wait for Retry-After and do not retry in a loop. A pass is not proof of safety. If verdict is block, do not proceed; if review, show the evidence and ask the user; if warn, follow the agent's normal approval policy. The public API lists $0.01 per call after the free credits. By default this stdio server never signs or submits payments; its optional x402 buyer bridge is disabled unless explicitly enabled and configured. Up to 40 files and 400 KB per code-audit call.

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.

No schema history has been recorded yet.

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: nothing is executed (static text analysis), the returned verdict/safe_to_deliver/findings shape, per-call credit consumption, 20 rpm rate limit, HTTP 400/401/402/429 handling, and the important caveat that a pass is not proof of safety. The readOnlyHint=false annotation is consistent with a paid API call that consumes account credits, not with executing the audited code.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, which is good, but the paragraph is long and embeds redundant commercial detail (free-call count plus $0.01 pricing plus x402 buyer-bridge/payment-facilitation explanation) that dilutes the operational essentials an agent needs to call the tool correctly.

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?

No output schema exists, and the description compensates fully by describing the verdict values, the safe_to_deliver flag, and findings with line numbers, plus size limits and error handling. An agent has everything needed to call it and interpret results.

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

Parameters4/5

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

Schema coverage is already 100%, so the schema explains code/path/files. The description adds meaning the schema lacks: an aggregate 400 KB per-call limit and confirmation that 'up to 40 files' is the batch cap for a single audit call.

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 and resource ('Audit source code') and enumerates exactly what it detects (RCE, exfiltration, reverse shells, secrets, typo-squats, unsafe patterns), which cleanly separates it from siblings like check_command or check_package that look at other artifacts.

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 a clear when-to-use trigger ('before delivering or running it') and explicit action branching on the result: block → do not proceed, review → show evidence and ask the user, warn → follow the normal approval policy. It stops short of naming an alternative tool, but the usage context is unambiguous.

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.