Skip to main content
Glama

build_audit

Read-only

Static security and correctness audit of a bundle (the code is not executed). Finds MONEY-01 client-chosen checkout amounts, AUTHZ-01 end users able to write server-owned fields (paid/issued/status/amount/payment refs) or create tickets and payments, FLOW-01 fulfilment in the browser or on payment_status alone, INV-01 capacity or stock without server-side enforcement, PUB-01 draft or hidden rows in PUBLIC_SCHEMAS, LAUNCH-01 missing terms/privacy/password reset/meta. Each finding has severity (blocker|critical|high|warning), location, evidence, the fix pattern and a fingerprint. Inputs: files or files_ref, or only project_uuid for the latest published version. build_go_live reports (or, when enforced, refuses on) open blocker and critical findings.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "build_audit"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNoMap of {relative_path: file_content} to audit before publishing.
patchNoChange only some files of base_version instead of re-sending the whole bundle. {path: new_content} replaces or adds a file, {path: null} deletes it, and {path: {"edits": [{"old": "exact text", "new": "replacement"}]}} replaces text inside it (each old must occur exactly once). Paths are app-root relative ('ui/app.js', no app folder). Everything else is taken from base_version, so the patch must hold every change since base_version, not only the latest fix. The merged bundle goes through the same checks as a full one. Use it for every change after the first publish. Do not combine with files/files_b64gz/files_ref.
files_refNoFor a LARGE bundle: a file_id from build_stage_bundle (gzip(json {path:content}) uploaded out-of-band).
files_b64gzNoAlt to files: base64(gzip(JSON {path:content})).
base_versionNoWith patch: the version_uuid of a version THIS project already published (build_publish and build_get_bundle return it; normally the latest). Its files are the starting point.
min_severityNoLowest severity to list (default 'warning' = everything).
project_uuidNoProject to audit; without files, its latest (or version_uuid) PUBLISHED bundle is audited.
version_uuidNoPublished version to audit (default: latest). Ignored when files are given.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / base_version
      Added value: +{
      +  "description": "With patch: the version_uuid of a version THIS project already published (build_publish and build_get_bundle return it; normally the latest). Its files are the starting point.",
      +  "type": "string"
      +}
    • addedInput schema / properties / patch
      Added value: +{
      +  "description": "Change only some files of base_version instead of re-sending the whole bundle. {path: new_content} replaces or adds a file, {path: null} deletes it, and {path: {\"edits\": [{\"old\": \"exact text\", \"new\": \"replacement\"}]}} replaces text inside it (each old must occur exactly once). Paths are app-root relative ('ui/app.js', no app folder). Everything else is taken from base_version, so the patch must hold every change since base_version, not only the latest fix. The merged bundle goes through the same checks as a full one. Use it for every change after the first publish. Do not combine with files/files_b64gz/files_ref.",
      +  "type": "object"
      +}
  2. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false; the description reinforces this with 'the code is not executed', which is important reassurance for a tool that inspects code. It adds genuinely new behavioral detail: the severity ladder (blocker|critical|high|warning) and the shape of each finding (location, evidence, fix pattern, fingerprint), plus the note that build_go_live can refuse on blocker/critical findings.

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 core purpose, then the detection catalog, then output shape, then input modes — a sensible information order. The rule-code enumeration is long but earns its place by telling the agent what classes of problems will be reported; only the input-mode sentence at the end feels compressed to the point of ambiguity.

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?

There is no output schema, so the description must carry return-value expectations, and it does: severities, per-finding fields, and fingerprints. For an 8-parameter tool with nested objects and a complex patch mode, the remaining gap is minor since the schema fully specifies input mechanics, though the interaction with build_go_live enforcement could have been spelled out further.

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 coverage is 100% and the schema itself documents all eight parameters in depth, including the patch semantics and the non-combinability rule. The description contributes only a high-level disjunction ('files or files_ref, or only project_uuid for the latest published version') and says nothing about min_severity, base_version, patch, or version_uuid, so it sits at the baseline for a fully documented schema.

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 precise verb and resource — 'Static security and correctness audit of a bundle (the code is not executed)' — and enumerates the exact rule families it detects (MONEY-01, AUTHZ-01, FLOW-01, INV-01, PUB-01, LAUNCH-01). This makes the scope distinguishable from siblings like build_doctor or build_e2e_test 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?

It gives clear context for invocation: audit a bundle from files/files_ref, or audit a published version via project_uuid, and it ties the result to build_go_live which 'reports (or, when enforced, refuses on) open blocker and critical findings'. What's missing is an explicit statement of when to run this instead of build_plan, build_doctor, or build_publish, or a stated precondition (e.g. always before go-live).

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.