Skip to main content
Glama

get_door_document

Retrieve full content of DOOR Knowledge Base documents using document IDs obtained from search results to access detailed support articles and PDFs.

Instructions

Obtiene el contenido completo de un documento específico de la DOOR Knowledge Base. Usa el ID obtenido de search_door_knowledge.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYesID del documento (obtenido de search_door_knowledge)

Implementation Reference

  • Registration of the 'get_door_document' tool including name, description, and input schema in the ListToolsRequestHandler.
    { name: 'get_door_document', description: 'Obtiene el contenido completo de un documento específico de la DOOR Knowledge Base. Usa el ID obtenido de search_door_knowledge.', inputSchema: { type: 'object', properties: { document_id: { type: 'string', description: 'ID del documento (obtenido de search_door_knowledge)', }, }, required: ['document_id'], }, },
  • Main handler function that loads the search index, finds the document by ID, reads the markdown content from file, and returns formatted response.
    async getDoorDocument(args) { const { document_id } = args; const index = await this.loadSearchIndex(); // Buscar documento en el índice const doc = index.documents.find(d => d.id === document_id); if (!doc) { throw new Error(`Documento no encontrado: ${document_id}`); } // Leer contenido completo const mdPath = path.join(this.knowledgeBasePath, doc.mdPath); try { const content = await fs.readFile(mdPath, 'utf-8'); return { content: [ { type: 'text', text: `# ${doc.title}\n\n**Categoría:** ${doc.category} > ${doc.subcategory}\n**Páginas:** ${doc.pages}\n**Archivo fuente:** ${doc.sourceFile}\n\n---\n\n${content}`, }, ], }; } catch (err) { throw new Error(`No se pudo leer el documento: ${err.message}`); } }
  • Dispatch case in CallToolRequestHandler that routes to the getDoorDocument method.
    case 'get_door_document': return await this.getDoorDocument(request.params.arguments);

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/guillelagoria/door-support-mcp'

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