Skip to main content
Glama

Generate Codebase Documentation Tool

generate-codebase-documentation

Use this when the user wants a new documentation Space built from selected files in an imported repository. After authorization, this state-changing action consumes AI credits, creates a private Space, links the repository, and queues per-file jobs using repository_id and selected_files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoOptional human language for the generated per-file codebase documentation. Defaults to English.
space_nameNoOptional name for the new documentation Space. If omitted, the platform creates a generated name from repository, branch, and timestamp.
repository_idYesRequired numeric ID of an already connected/imported repository from the user repository records; do not pass a slug, URL, provider name, or Space repository-link ID.
selected_filesYesRequired repository file paths already selected from the imported repository tree, such as app/Models/User.php or routes/api.php. This tool creates one Space with per-file queued docs; use browser guidance if the user still needs to choose files.
additional_instructionsNoOptional customer instructions for documentation tone, scope, examples, framework focus, or project-specific emphasis applied to every queued file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

The description fully discloses side effects: it is a 'state-changing action' that 'consumes AI credits, creates a private Space, links the repository, and queues per-file jobs.' This aligns perfectly with the annotations (readOnlyHint=false, destructiveHint=false) and leaves no hidden consequences for the agent.

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 main description is a single, dense sentence that conveys the action, prerequisites, side effects, and core parameters without any fluff. The parameter descriptions are equally succinct yet informative, making the entire tool definition highly efficient.

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?

The description covers the essential context: when to use, what it does, side effects, and key inputs. It does not include an output schema, so no return value is needed. However, it omits any mention of what the user will see after the call (e.g., a Space ID or job status), which could be helpful but is not strictly required given the lack of output schema.

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

Parameters4/5

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

Schema description coverage is 100%, but the parameter descriptions go beyond basic definitions. For example, repository_id explicitly warns against passing slugs or URLs, and selected_files clarifies that the tool creates one Space with per-file queued docs and suggests browser guidance when files are not yet chosen. This adds practical value beyond the raw schema.

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: creating a new documentation Space from selected files in an imported repository. It uses a specific verb ('creates') and distinguishes this tool from siblings like generate-code-documentation by emphasizing the Space creation and per-file queued jobs based on selected_files.

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 description explicitly opens with 'Use this when the user wants a new documentation Space built from selected files in an imported repository,' providing a clear condition. It also notes 'After authorization' as a prerequisite and warns about credit consumption, but it does not explicitly mention alternative tools when the user wants different outputs (e.g., full-tree vs. selected files), so it's not fully exhaustive.

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.

Resources