Skip to main content
Glama

cwi-discovery-engine

semantic_search

Semantic search over the CWI catalog embedding matrix: cosine similarity against 384-dim bge-small-en-v1.5 vectors (55 tracks). The query is embedded at request time with Workers AI @cf/baai/bge-small-en-v1.5 — the same model that produced the matrix, so catalog and query vectors are directly cosine-comparable. No inference needed on your side; just call this tool. FALLBACK (documented, never silent): if the Workers AI [ai] binding is unavailable at runtime, the tool DEGRADES to keyword scoring over the matrix text fields and says so in its response (method "fallback:keyword", plus a fallback_note). Fallback scores are keyword weights (title 3x, genre/descriptor 2x, mood 1x) — they are NOT cosine similarity and are never presented as semantic scores.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesNatural-language music query, e.g. "dark cyberpunk rap for a film scene". Truncated at 500 characters.
limitNoMax results, 1-20 (default 5).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so well: it documents the unsilent degradation path if the Workers AI binding is unavailable, the exact method string ('fallback:keyword') and fallback_note reported in the response, and the fallback's weighting scheme. It also clarifies that fallback scores are never presented as cosine similarity, which prevents an agent from misreading output.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the fallback detail is separated into its own labeled block, so the extra length is largely earned by genuinely unusual runtime behavior. Some phrasing is promotional filler ('the same model that produced the matrix', 'No inference needed on your side; just call this tool') that could be trimmed without loss.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with no annotations and no output schema, the description does the compensating work by naming response fields (method, fallback_note) and describing the scoring basis. It omits result shape details such as per-result fields or ordering guarantees, which is the main remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both q and limit are already documented in the schema (natural-language query, 500-char truncation, 1-20 range, default 5). The description adds no syntax or example beyond the schema's own example. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (semantic search over the CWI catalog embedding matrix) and pins down the mechanism (cosine similarity against 384-dim bge-small-en-v1.5 vectors). An agent immediately knows this is meaning-based retrieval, not keyword matching. It does not, however, name or contrast itself with search_catalog or sync_search, which are the obvious alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The line 'No inference needed on your side; just call this tool' implies it is safe to invoke without pre-embedding, which is useful context. But there is no explicit statement of when to prefer this over search_catalog/sync_search or when-not to use it (e.g. exact-match lookups). Usage is implied rather than routed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.