LearnNewsExamplesServices
Frontmatter
id7507
titleImplement Query Documents Service
stateClosed
labels
enhancementai
assigneestobiu
createdAtOct 16, 2025, 12:47 PM
updatedAtOct 16, 2025, 12:54 PM
githubUrlhttps://github.com/neomjs/neo/issues/7507
authortobiu
commentsCount0
parentIssue7501
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 16, 2025, 12:54 PM

Implement Query Documents Service

Closed v11.0.0 enhancementai
tobiu
tobiu commented on Oct 16, 2025, 12:47 PM

This ticket covers the implementation of the query_documents service for the AI Knowledge Base MCP server. This is the primary read operation for the server, allowing AI agents to perform semantic searches against the vector database.

The implementation will be adapted from the existing buildScripts/ai/queryKnowledgeBase.mjs script.

Acceptance Criteria

  1. A new ai/mcp/server/knowledge-base/services/queryService.mjs file is created.
  2. The service contains a queryDocuments function that takes a query string and an optional type filter.
  3. The function connects to ChromaDB, generates an embedding for the query, and retrieves the most relevant documents.
  4. The function applies the existing scoring algorithm to the results.
  5. The function returns a JSON object containing the ranked list of results, matching the QueryResponse schema in openapi.yaml.
  6. The toolService.mjs serviceMapping is updated to point the query_documents operationId to the new service function.
tobiu assigned to @tobiu on Oct 16, 2025, 12:47 PM
tobiu added parent issue #7501 on Oct 16, 2025, 12:47 PM
tobiu added the enhancement label on Oct 16, 2025, 12:47 PM
tobiu added the ai label on Oct 16, 2025, 12:47 PM
tobiu referenced in commit cfab82c - "Implement Query Documents Service #7507" on Oct 16, 2025, 12:54 PM
tobiu closed this issue on Oct 16, 2025, 12:54 PM