Skip to main content
Glama

docgen

Read-only

Systematically analyzes code structure to generate code documentation, API docs, and complexity assessment.

Instructions

Generates comprehensive code documentation with systematic analysis of functions, classes, and complexity. Use for documentation generation, code analysis, complexity assessment, and API documentation. Analyzes code structure and patterns to create thorough documentation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepYesCurrent work step content and findings from your overall work
findingsYesImportant findings, evidence and insights discovered in this step
step_numberYesCurrent step number in work sequence (starts at 1)
total_stepsYesEstimated total steps needed to complete work
issues_foundNoIssues identified with severity levels during work
document_flowYesInclude call flow/dependency notes when True (default).
relevant_filesNoFiles identified as relevant to issue/goal (FULL absolute paths to real files/folders - DO NOT SHORTEN)
continuation_idNoUnique thread continuation ID for multi-turn conversations. Works across different tools. ALWAYS reuse the last continuation_id you were given—this preserves full conversation context, files, and findings so the agent can resume seamlessly.
update_existingYesTrue (default) to polish inaccurate or outdated docs instead of leaving them untouched.
relevant_contextNoMethods/functions identified as involved in the issue
next_step_requiredYesWhether another work step is needed. When false, aim to reduce total_steps to match step_number to avoid mismatch.
document_complexityYesInclude algorithmic complexity (Big O) analysis when True (default).
use_assistant_modelNoUse assistant model for expert analysis after workflow steps. False skips expert analysis, relies solely on your personal investigation. Defaults to True for comprehensive validation.
num_files_documentedYesCount of files finished so far. Increment only when a file is fully documented.
total_files_to_documentYesTotal files identified in discovery; completion requires matching this count.
comments_on_complex_logicYesTrue (default) to add inline comments around non-obvious logic.
Behavior3/5

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

Annotations already indicate readOnlyHint=true; description adds 'generates' which is consistent but does not disclose further behavioral details such as auth requirements or limitations.

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?

Two concise sentences that front-load the purpose and use cases; no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the high parameter count and no output schema, the description is sufficient for a high-level understanding but lacks details on workflow or step-by-step usage.

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 description does not need to add parameter details; it provides no additional meaning beyond the 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 generates code documentation with systematic analysis of functions, classes, and complexity, distinguishing it from siblings like codereview and testgen.

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 lists explicit use cases (documentation generation, code analysis, complexity assessment, API documentation) but does not provide when-not-to-use or compare directly to alternatives.

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/bigl34/pal-mcp-server'

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