Skip to main content
Glama

scan_codebase

Analyze a project's codebase to map structure, routes, forms, and existing tests, identify coverage gaps, and generate test scenarios. Use before testing to guide your testing strategy.

Instructions

Analyze a project's codebase to understand its structure, routes, forms, components, existing tests, and coverage gaps. Returns a ProductModel with routes, behaviours, coverage map, gaps, and generated test scenarios. Call this first before any testing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe base URL of the running application (e.g. http://localhost:3000 or https://staging.myapp.com). If the app is running on a staging/dev URL, provide that instead of localhost.
modeNofast = quick heuristic scan. deep = full extraction with dialogs/features (default).deep
codebase_pathYesAbsolute path to the project root directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It discloses the return type (ProductModel) and the contained data, and the verb 'Analyze' implies a read-only operation. However, it does not explicitly state side effects, whether it modifies anything, or any operational constraints like time or dependency on a running app.

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?

The description is two dense sentences with no filler. Purpose is front-loaded, the return value is summarized, and the critical sequencing instruction is stated at the end. Every sentence earns its place.

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?

For a first-step analysis tool with no output schema and no annotations, the description covers the central facts: what it analyzes, what it returns, and when to call it. It could be slightly richer about mode semantics or preconditions, but those are already largely captured in the schema and this is otherwise sufficient for correct invocation.

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%, so the input schema already documents all three parameters (url, mode, codebase_path). The description adds no additional parameter-level meaning beyond the overall workflow, so it sits at the baseline 3 rather than higher.

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?

The description uses a specific verb ('Analyze') and resource ('a project's codebase'), and enumerates what is examined: structure, routes, forms, components, existing tests, and coverage gaps. It distinguishes itself from siblings like scan_page_elements (which is page-specific) by making the codebase-wide scope explicit and by positioning itself as the initial step.

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?

The instruction 'Call this first before any testing' provides explicit when-to-use guidance, establishing this tool as the entry point before scanning pages, executing scenarios, or generating reports. It does not explicitly list alternatives or state when not to use it, so it stops short of a full 5.

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