Skip to main content

MCP Resources

TeaRAGs exposes read-only MCP resources — structured reference documents an agent can fetch on demand to answer "what can I do with this tool?", "which preset fits?", "which signal is which weight key?". They complement tools (which act) by providing self-documenting metadata (schema, thresholds, examples).

All resources return text/markdown (schema guides) or application/json (collection info).

Catalog

URIWhat it returnsWhen to read
tea-rags://schema/overviewResource catalog + tools quick reference + destructive-tool warningsStarting point — one resource that lists everything else
tea-rags://schema/presetsEvery rerank preset: name, description, signal weights, tools it supportsChoosing rerank: "..." for semantic_search / hybrid_search / rank_chunks
tea-rags://schema/signalsAll weight keys for rerank: { custom: { ... } } modeBuilding a custom rerank when no preset fits
tea-rags://schema/filtersQdrant filter operators, combining conditions, available payload fieldsBuilding filter parameter for any search tool
tea-rags://schema/search-guideParameter examples per tool (search_code, semantic_search, hybrid_search, find_symbol, rank_chunks)Unsure how to call a specific tool
tea-rags://schema/indexing-guideindex_codebase options + git-metadata filter reference + reindex workflowBefore first index_codebase call or when wiring incremental reindex
tea-rags://schema/signal-labelsPercentile-to-label mappings (e.g. p75 → "high") for every numeric signal in ranking overlaysInterpreting label values in search result overlays
qdrant://collectionsJSON list of all Qdrant collectionsDiscovering what's already indexed
qdrant://collection/{name}JSON: collection config, point count, vector countDebugging a specific collection

Why resources exist

Tools have schemas — parameters, types, descriptions. But some things are too large or too dynamic to live in tool schemas:

  • Preset catalog grows over time; inlining it in every semantic_search call wastes tokens.
  • Signal labels (low/typical/high/extreme) are percentile-derived per codebase — they depend on indexed data, not static defaults.
  • Filter syntax is a full query language that applies to many tools.

Resources let an agent fetch this data once per session, cache it, and reuse across many tool calls.

How to fetch a resource

In Claude Code, resources surface as @<uri> references or via the ReadMcpResource tool. In raw MCP protocol:

{
"method": "resources/read",
"params": { "uri": "tea-rags://schema/presets" }
}

The response contents[0].text carries the markdown body.

Dynamic vs static content

Most tea-rags://schema/* resources are statically generated at server startup from code:

  • presets and signals are derived from the Reranker via SchemaBuilder — they reflect exactly what's registered in the trajectory registry.
  • signal-labels is built from get_index_metrics thresholds — the response changes per codebase because percentile buckets depend on indexed data.
  • filters, overview, search-guide, indexing-guide are static markdown embedded in the server binary.

qdrant://* resources are always dynamic — they hit the live Qdrant instance.

  • Tools — how to act on data; resources document how to parameterize those actions.
  • Search Strategies — narrative guide that references these resources implicitly.
  • Rerank Presets — human-readable preset catalog (the resource version is machine-oriented).