Skip to main content
Glama

semantic_search

Rank a list of documents against a query using cosine similarity of bge embeddings. Returns top-k matches with scores.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoCF AI model ID override
queryYesSearch query
top_kNoNumber of results (default 5)
documentsYesCandidate documents to rank

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the method (cosine similarity of bge embeddings) and output behavior (returns top-k matches with scores), which is adequate, though it doesn't mention internal embedding handling or potential side effects.

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

Conciseness5/5

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

Two concise sentences, front-loaded with the verb 'Rank', and no filler or redundant information. Every sentence contributes meaning.

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 search tool with complete schema coverage and no output schema, the description sufficiently conveys the tool's purpose and output. It lacks a precise return format but is otherwise complete for the complexity level.

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?

The input schema covers all 4 parameters with descriptions (100% coverage), so the baseline is 3. The description adds no additional parameter semantics beyond what the schema already provides.

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

Purpose5/5

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

The description clearly states a specific verb ('Rank'), resource ('documents'), and scope ('against a query using cosine similarity of bge embeddings'), and distinguishes it from siblings like generate_embeddings and compute_similarity by focusing on document ranking with scores.

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

Usage Guidelines4/5

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

The description implies clear usage context: you have a query and candidate documents and want ranked results. It doesn't explicitly mention alternatives or exclusions, but the context is sufficiently clear for an agent to infer when to use it.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool addresses a distinct operation: generate_embeddings creates vectors, compute_similarity compares two texts directly, and semantic_search ranks a list of documents against a query. No overlapping purposes.

Naming Consistency4/5

Two tools follow the verb_noun pattern (generate_embeddings, compute_similarity), but semantic_search uses a noun phrase instead, which is a minor deviation from the otherwise consistent style.

Tool Count5/5

With only three tools, the server is tightly scoped to the embedding-based search domain. Each tool has a clear role, and the count is appropriate for the functionality offered.

Completeness5/5

The server covers the complete workflow: embedding generation, pairwise similarity, and semantic search. There are no obvious missing operations for the stated purpose.

Resources