Skip to main content
Glama

generate_docs

Idempotent

Generate structured project documentation from the code graph, including architecture, API surface, data models, components, and dependency analysis. Outputs markdown or HTML.

Instructions

Auto-generate project documentation from the code graph. Produces structured docs with architecture, API surface, data models, components, and dependency analysis. Writes output file (markdown or HTML). Use when you need a comprehensive documentation snapshot. Returns JSON: { format, sections, outputPath }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoScope (default: project)
pathYesPath for module/directory scope
formatNoOutput format (default: markdown)
sectionsNoSections to include (default: all)
Behavior4/5

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

Annotations already indicate idempotent and non-destructive behavior. The description adds that it writes an output file (markdown/HTML) and returns a JSON with specific keys, giving the agent a clear picture of side effects and return shape without contradiction.

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 concise (5 sentences), front-loaded with the core action, and each sentence adds unique value (purpose, output sections, file writing, usage, return structure). Minor redundancy could be removed, but it's well-structured.

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?

Given the tool complexity (4 params, 1 required, enums, no output schema), the description covers purpose, output format, return structure, and usage context. With schema providing parameter details, the agent has sufficient information to invoke the tool correctly.

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?

Input schema descriptions cover all parameters (100% coverage), providing defaults and enum options. The description adds no significant new parameter semantics beyond what the schema already offers, meeting the baseline.

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 that the tool auto-generates project documentation from the code graph, listing specific sections (architecture, API surface, etc.) and distinguishing itself as comprehensive compared to sibling tools like get_api_surface or get_outline.

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 says 'Use when you need a comprehensive documentation snapshot,' providing clear guidance for when to invoke this tool over alternatives, though it does not explicitly exclude other scenarios.

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/nikolai-vysotskyi/trace-mcp'

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