Skip to main content
Glama

Generate Documentation In Space

generate-and-add-documentation

Use this when the user supplies source files and wants the generated documentation saved directly in an existing Space. After authorization, this state-changing action consumes AI credits, creates a generation, and writes a document to the specified space_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoOptional custom name used to identify the documentation in generation history
pathNoFolder path for the document (e.g., "docs/api") - creates folders if they don't exist
filesYesArray of files to document. Each file must have filename and source_code properties
titleYesTitle for the document in the space
space_idYesThe numeric ID of the space to add the documentation to. Call list-spaces first.
parent_idNoThe numeric ID of the parent folder (optional)
output_languageNoOutput language for documentation
documentation_typeNoFree-text style hint for this single document, e.g. 'API Reference', 'Tutorial', 'General Documentation' (the default). This is NOT a Space's full-tree documentation audience — any string is accepted and passed to the prompt as-is.
additional_instructionsNoAdditional instructions for documentation generation

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

The description openly discloses that this is a state-changing action, consumes AI credits, creates a generation, and writes a document to the specified space_id. This goes beyond the annotations and gives the agent a clear picture of side effects before invocation.

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 description is two concise sentences, front-loads the primary use case, and includes key side effects without unnecessary wording. Every sentence adds meaningful information.

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 has 9 parameters and no output schema, the description provides essential context: when to use it, what it produces, and what side effects it has. It does not describe the return value or explicitly contrast sibling tools, but the schema covers parameters and the core behavior is sufficiently contextualized.

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% and every parameter already has a detailed description, including the instruction to call list-spaces first for space_id. The tool description itself does not add extra parameter-level meaning, but the schema already carries the weight, so the baseline score of 3 is appropriate.

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: use it when source files are supplied and generated documentation should be saved directly into an existing Space. It names the action, target resource, and outcome, and it is implicitly distinct from plain generation tools by emphasizing the direct write to a space.

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 gives an explicit 'use this when' condition: when the user supplies source files and wants documentation saved directly in an existing Space. It does not mention when to prefer an alternative tool, such as add-generation-to-space, but the primary usage scenario is clear enough.

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