Skip to main content
Glama

Semantic Search

semantic_search
Read-onlyIdempotent

Semantic search across the full corpus — every place dossier, corridor signal, meeting reading, and named-pattern brief. Returns results ranked by cosine similarity in a 1024-dimensional embedding space (Voyage AI 4 + Supabase pgvector). Use when the agent does not know the canonical entity slug or named-pattern title in advance — the search returns the readings whose semantic structure best matches the natural-language query, with type, title, similarity, and resolved URL per hit. Threshold 0.55, top 12.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesThe natural-language query. A phrase, an entity name, or a thematic concept all work. Asymmetric query-time embedding handles short queries cleanly. Maximum 500 characters.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hitsNo
countNo
queryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "count": {
      +      "type": "number"
      +    },
      +    "hits": {
      +      "items": {
      +        "properties": {
      +          "similarity": {
      +            "type": "number"
      +          },
      +          "slug": {
      +            "type": "string"
      +          },
      +          "subtitle": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "title": {
      +            "type": "string"
      +          },
      +          "type": {
      +            "type": "string"
      +          },
      +          "url": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "slug",
      +          "type",
      +          "title",
      +          "similarity",
      +          "url"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "query": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive. The description adds substantive behavioral context: cosine similarity ranking, the 1024-dimensional embedding space (Voyage AI 4 + pgvector), result count limit (top 12), similarity threshold (0.55), and resolved URL per hit. This goes well beyond the annotations and sets clear expectations for the agent.

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 description is three sentences and every sentence delivers distinct value: corpus scope, embedding/ranking details, usage guidance, and output shape. It is slightly long but not wasteful; the density is appropriate for a complex semantic search tool.

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

Completeness5/5

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

With an output schema present, the description still covers return fields (type, title, similarity, resolved URL), result limit, threshold, and coverage. Given a single-parameter tool with rich annotations and an output schema, the description is fully complete for an agent to invoke and interpret results correctly.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds practical meaning to the 'q' param: it accepts a phrase, entity name, or thematic concept, and explains that asymmetric query-time embedding handles short queries cleanly. This enriches the schema's description and gives the agent actionable guidance on crafting queries.

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 opens with 'Semantic search across the full corpus' and enumerates the exact sources (place dossiers, corridor signals, meeting readings, named-pattern briefs). It distinguishes itself from sibling describe/list tools by explicitly stating it is for when the agent does not know the canonical slug or title in advance. This is a specific verb+resource+scope with clear differentiation.

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

Usage Guidelines5/5

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

Explicitly states when to use: 'Use when the agent does not know the canonical entity slug or named-pattern title in advance.' This also implies when not to use (when you do know, use describe/list tools). It further clarifies what the tool returns (type, title, similarity, URL) and the technical constraints (threshold 0.55, top 12), giving the agent sufficient context to decide.

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.

Resources