Skip to main content
Glama

analyze_codebase

Analyze a source code directory to generate a cold-start bootstrap report with language distribution, top files for documentation, and recommended next steps.

Instructions

Analyze a source code directory and return a cold-start bootstrap report. Read-only.

    Does not modify source files or the vector index. Runs entirely
    server-side using Python ast, regex, and local MiniLM embeddings —
    no cloud calls, no token cost.

    The report is cached at /data/coldstart-{project}.md after the first
    run and returned instantly on subsequent calls. Use force=True only
    after significant code changes — not for routine sessions.

    Use at the START of work on an unfamiliar codebase instead of reading
    dozens of files. Then use the write_*() tools to document the top
    files identified in the report. Use classify_documents() for existing
    .md files in the project repo.

    The path must be accessible inside the Docker container (i.e. mounted
    as a volume). It cannot reach paths on the host that are not mounted.

    Args:
        path: Absolute path to the source directory to scan
        force: Regenerate even if a cached report exists (default: False)
        project: Target project name (optional)

    Returns:
        Markdown report (~5–20 KB) with language distribution, category map,
        top 20 files ranked by documentability, near-duplicate file pairs,
        undocumented directories, and recommended next steps.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
forceNo
projectNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations are provided, so the description fully discloses behavior: read-only, no modifications, server-side execution, no cloud calls or token cost, caching with instant return on subsequent calls, and path mount requirements. No contradictions.

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?

The description is well-structured with a lead sentence, bullet-style paragraphs, and explicit Args/Returns sections. It contains necessary details without excessive verbosity. Slightly long but justified by the need to cover behavior, caching, and usage context.

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?

Given the tool's complexity and the presence of an output schema (Markdown report), the description covers input parameters, behavior, caching policy, usage timing, and alternative tools. It provides complete context for an agent to select and invoke this tool correctly.

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

Parameters5/5

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

Schema description coverage is 0%, but the description explains all parameters: path (absolute path in container), force (regenerate cache, default False), project (optional). It also describes the return value (Markdown report with specific sections). This compensates fully for the missing schema descriptions.

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 clearly states the tool's purpose: 'Analyze a source code directory and return a cold-start bootstrap report.' It uses a specific verb and resource, and distinguishes itself from siblings like classify_documents and write_* tools, which are mentioned for subsequent steps.

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

Usage Guidelines5/5

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

Explicit guidance is provided: 'Use at the START of work on an unfamiliar codebase instead of reading dozens of files.' It advises against frequent use of force=True and directs users to alternative tools (write_*, classify_documents) for subsequent tasks. Also notes path accessibility constraints.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dl4rce/flaiwheel'

If you have feedback or need assistance with the MCP directory API, please join our Discord server