get_document
Retrieve a specific document by its unique ID to access basic information and content from the Helios-9 project management system.
Instructions
Get a document by ID with basic information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | The unique identifier of the document |
Implementation Reference
- src/tools/documents.ts:600-611 (handler)The main handler function for the 'get_document' MCP tool. Validates input using GetDocumentSchema, logs the request, fetches the document by ID using supabaseService.getDocument, and returns the document object with a success message.export const getDocument = requireAuth(async (args: any) => { const { document_id } = GetDocumentSchema.parse(args) logger.info('Getting document', { document_id }) const document = await supabaseService.getDocument(document_id) return { document, message: `Document "${document.title}" retrieved successfully` } })
- src/tools/documents.ts:25-27 (schema)Zod validation schema used by the get_document handler to parse and validate the input argument 'document_id' as a UUID string.const GetDocumentSchema = z.object({ document_id: z.string().uuid() })
- src/tools/documents.ts:584-598 (registration)MCPTool object that registers the 'get_document' tool, including its name, description, and JSON schema for the MCP protocol's listTools response.export const getDocumentTool: MCPTool = { name: 'get_document', description: 'Get a document by ID with basic information', inputSchema: { type: 'object', properties: { document_id: { type: 'string', format: 'uuid', description: 'The unique identifier of the document' } }, required: ['document_id'] } }
- src/tools/documents.ts:1346-1358 (registration)Export of handler map including 'get_document' handler, imported by src/index.ts and merged into the main allHandlers object used by the MCP server to dispatch tool calls.export const documentHandlers = { list_documents: listDocuments, create_document: createDocument, get_document: getDocument, update_document: updateDocument, search_documents: searchDocuments, get_document_context: getDocumentContext, add_document_collaborator: addDocumentCollaborator, analyze_document_content: analyzeDocumentContent, get_document_collaboration: getDocumentCollaboration, generate_document_template: generateDocumentTemplate, bulk_document_operations: bulkDocumentOperations }
- src/index.ts:143-156 (registration)Main MCP server constructor merges documentHandlers (which includes get_document) into allHandlers, used to execute tool calls via this.server.setRequestHandler(CallToolRequestSchema). Also includes documentTools in allTools for listTools.this.allHandlers = { ...projectHandlers, ...taskHandlers, ...documentHandlers, ...conversationHandlers, ...contextAggregationHandlers, ...workflowAutomationHandlers, ...intelligentSearchHandlers, ...analyticsInsightsHandlers, ...initiativeHandlers, ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}), ...debugHandlers, }