Skip to main content
Glama
jakedx6
by jakedx6

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
NameRequiredDescriptionDefault
document_idYesThe unique identifier of the document

Implementation Reference

  • 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` } })
  • 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() })
  • 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'] } }
  • 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, }

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/jakedx6/helios9-MCP-Server'

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