Files
kb/openspec/changes/kb-v3-mcp-server/specs/agent-search-patterns/spec.md
T
steve e7136a4a20 Add MCP server, note mutation endpoint, and updated_at tracking (v3.0.0)
New MCP server (mcp/) exposes kb operations as native MCP tools over
Streamable HTTP with Bearer token auth. Supports collections via tag
conventions, chunked file uploads, and agent-side search patterns.

Engine gains PATCH /api/v1/notes/{id} for in-place note updates with
transactional re-chunk/re-embed, and updated_at column on documents.

Go client adds updatenote command and Patch HTTP method.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 21:34:55 +01:00

1.7 KiB

Agent-Side Search Patterns

Purpose

Documents recommended patterns for agent-side query expansion and reranking, which are caller responsibilities rather than engine features. These patterns are communicated via MCP tool descriptions.

Requirements

Requirement: Query expansion guidance in tool description

The kb_search MCP tool description SHALL include guidance on query expansion as a recommended pattern for complex queries.

Scenario: Tool description includes expansion pattern

  • WHEN an agent reads the kb_search tool description
  • THEN the description SHALL include guidance such as: "For complex queries, consider expanding into 2-3 variant phrasings and calling this tool multiple times, then deduplicating results by chunk_id"

Requirement: Reranking guidance in tool description

The kb_search MCP tool description SHALL include guidance on agent-side reranking as a recommended pattern for improving precision.

Scenario: Tool description includes reranking pattern

  • WHEN an agent reads the kb_search tool description
  • THEN the description SHALL include guidance such as: "For precision, rerank the returned results using your own judgement based on relevance to the original question"

Requirement: No engine-side LLM dependency

The engine SHALL NOT require or use any external LLM API for search operations. Query expansion and reranking SHALL remain entirely agent-side concerns.

Scenario: Engine has no LLM dependency

  • WHEN the engine is deployed without any ANTHROPIC_API_KEY or similar LLM API configuration
  • THEN all search operations SHALL function fully, with no degraded results or missing features