Skip to main content
Glama

analyze_codebase

Scan a source code directory and produce a cold-start bootstrap report with language distribution, top documentable files, and recommended next steps for onboarding.

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?

The description fully discloses behavioral traits: it is read-only, does not modify files or the index, runs entirely server-side with no cloud calls, and caches results. Since no annotations are provided, the description carries the full burden and meets it comprehensively.

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, starting with the core purpose followed by details on behavior, usage, and parameters. While slightly verbose, every sentence adds value, and the structure aids readability.

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 (code analysis, caching, multiple parameters) and presence of an output schema, the description is exceptionally complete. It covers purpose, usage, parameter details, return format, and relationships to siblings, leaving no critical gaps.

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?

With 0% schema description coverage, the description compensates by explaining each parameter in detail (path, force, project) including defaults and implications. It adds meaning beyond the schema, such as explaining the caching behavior and when to use force.

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 action: 'Analyze a source code directory and return a cold-start bootstrap report.' It also distinguishes itself from sibling tools like classify_documents and write_*() tools, providing context for when to use this tool versus others.

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?

The description explicitly advises using this tool at the start of work on an unfamiliar codebase and which tools to use afterward. It also specifies when to use force=True ('only after significant code changes — not for routine sessions'), providing clear guidance on appropriate usage.

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