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

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.1/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), the description discloses that authorization is required first, that the action consumes AI credits, that it creates a generation, and that it writes a document into the given space_id. Credit consumption and the auth prerequisite are non-obvious side effects the agent needs before calling.

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 sentences, both front-loaded: the first states the selection condition, the second the side effects. No filler and nothing buried.

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?

For a 9-parameter, state-changing tool with no output schema, the description covers the selection context and side effects well. It does not indicate what comes back (e.g., a generation identifier usable with get-generation or add-generation-to-space), which is a minor gap given no output schema exists.

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 description coverage is 100%, so every one of the 9 parameters is already documented in the schema, including space_id's 'call list-spaces first' hint and path's folder-creation behavior. The description mentions only space_id and source files, adding no syntax or format detail beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('generate documentation') plus the key scoping qualifier 'saved directly in an existing Space,' which implicitly separates it from the many generate-* siblings that only produce a generation. It does not explicitly name the alternative tools (e.g., generate-code-documentation vs. add-generation-to-space), so it falls short of full sibling differentiation.

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?

'Use this when the user supplies source files and wants the generated documentation saved directly in an existing Space' gives a clear triggering condition and a scope qualifier. There is no explicit when-not guidance or named alternative, but the context for invoking it is unambiguous.

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.