Generate Documentation In Space
generate-and-add-documentationUse 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"space_id": "<space_id>",
"files": "<files>",
"title": "<title>"
},
"name": "generate-and-add-documentation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional custom name used to identify the documentation in generation history | |
| path | No | Folder path for the document (e.g., "docs/api") - creates folders if they don't exist | |
| files | Yes | Array of files to document. Each file must have filename and source_code properties | |
| title | Yes | Title for the document in the space | |
| space_id | Yes | The numeric ID of the space to add the documentation to. Call list-spaces first. | |
| parent_id | No | The numeric ID of the parent folder (optional) | |
| output_language | No | Output language for documentation | |
| documentation_type | No | Free-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_instructions | No | Additional instructions for documentation generation |