This ticket covers the implementation of the previously optional document retrieval endpoints. This will provide essential tools for inspecting and debugging the contents of the knowledge base.
Two distinct tools will be created:
list_documents: To list documents from the collection, with support for pagination.
get_document_by_id: To retrieve a single document by its unique ID.
Acceptance Criteria
- The
openapi.yaml file is updated with two new endpoints:
GET /documents
GET /documents/{id}
- The endpoints have
operationIds of list_documents and get_document_by_id respectively.
- A new
ai/mcp/server/knowledge-base/services/documentService.mjs file is created.
- The service contains
listDocuments and getDocumentById functions.
- The
toolService.mjs serviceMapping is updated to point the new operationIds to their respective service functions.
This ticket covers the implementation of the previously optional document retrieval endpoints. This will provide essential tools for inspecting and debugging the contents of the knowledge base.
Two distinct tools will be created:
list_documents: To list documents from the collection, with support for pagination.get_document_by_id: To retrieve a single document by its unique ID.Acceptance Criteria
openapi.yamlfile is updated with two new endpoints:GET /documentsGET /documents/{id}operationIds oflist_documentsandget_document_by_idrespectively.ai/mcp/server/knowledge-base/services/documentService.mjsfile is created.listDocumentsandgetDocumentByIdfunctions.toolService.mjsserviceMappingis updated to point the newoperationIds to their respective service functions.