Skip to main content
Glama

Scan a codebase

scan
Read-onlyIdempotent

Check whether a project directory is safe to run, will work, and is complete; flag dangerous calls, leaked keys, broken imports, and missing files without executing code.

Instructions

Is it safe to run, will it work, does it have what it needs? Safe, Works and Complete scores (0-100, higher is better), Overall and an A-F grade, every finding with file:line, the egress inventory and orphan-code hygiene. Deterministic; parses only, never runs the code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalNogoal contract file; default PATH/code-guardian.goal.toml if present
pathYesthe project directory to read
fail_onNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, so the safety profile is covered. The description adds real value on top: it is deterministic, it parses but never executes the target code, and it enumerates the report contents. It does not, however, explain what happens when fail_on trips or whether a run can fail the call.

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?

Dense but front-loaded: the output claims (Safe/Works/Complete, grade, findings with file:line) come first and the determinism guarantee last. The opening rhetorical question is slightly promotional, but no sentence is wasted and it stays within one compact block.

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 carries the return-value burden and does so well, listing scores, grade, findings, egress inventory and orphan hygiene. The remaining gap is operational rather than descriptive: fail_on thresholds and the goal-contract default are undocumented, so an agent cannot predict the call's failure mode.

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?

With 67% schema coverage, the schema documents path and goal adequately, so the baseline is 3. The description adds no parameter-level meaning at all and leaves fail_on (INFO/WARN/FAIL) unexplained, which is the parameter whose semantics an agent most needs to choose correctly.

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?

The title plus description make it clear this reads a project directory and emits safety/workability/completeness scores, a grade, and file:line findings. It is specific about the resource and the output shape, but never distinguishes itself from the 'orphans' and 'explain' siblings, even though 'orphan-code hygiene' overlaps with 'orphans'.

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: nothing says when to run scan versus orphans or explain, whether it should precede or follow them, or what the goal contract changes. The only usage-adjacent hint is that it 'parses only, never runs the code', which is behavioral rather than situational.

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