Skip to main content
Glama

ArchGuard MCP

audit_code_snippet

Audit source files for circular dependencies (Tarjan SCC), coupling metrics (Ca/Ce/I), and 12 production reliability/security/SOLID anti-patterns (N+1 loops, missing HTTP timeouts, unbounded caches, check-then-act races, missing idempotency keys, SQL/command injection). Returns health score + Mermaid graph.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "files": "<files>"
    },
    "name": "audit_code_snippet"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYes
maxFileLinesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It discloses the analysis scope and that it returns a health score plus a Mermaid graph, and the framing implies a non-mutating read-only audit, but it never states this explicitly, nor does it cover limits, cost, or behavior on oversized input — relevant because a maxFileLines parameter exists.

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 front-loaded sentence leads with the verb and resource, then packs the check inventory into parentheticals, closing with what is returned. Every clause adds discriminating information and nothing is redundant.

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 static-analysis tool with no annotations and no output schema, the description covers the inputs' intent and the headline outputs, but leaves gaps around supported languages, size limits, and the meaning/format of the returned health score. Adequate to attempt a call, not complete enough to predict its behavior.

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

Parameters2/5

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

Schema description coverage is 0% and the description says nothing about either parameter. The nested path/content structure is largely self-evident, but maxFileLines is completely unexplained — an agent cannot tell whether it truncates, skips, or errors on long files, which materially changes results.

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 ('Audit') and resource ('source files') and then enumerates exactly what is analyzed: circular dependencies via Tarjan SCC, coupling metrics Ca/Ce/I, and named anti-pattern categories. This is far more concrete than any of the sibling tools (migration safety, capacity estimation, hashing/quorum simulation), so an agent can tell immediately which analysis it needs.

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

Usage Guidelines3/5

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

Usage is only implied by the verb 'Audit' — an agent infers this is the tool for static code review. There is no statement of when to prefer it over another check, no prerequisites, and no exclusions (e.g., which languages or file types are supported, whether it is meant for single files or whole repos).

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.