Skip to main content
Glama

semantic_search

Read-onlyIdempotent

Finds companies, people, and assets by meaning, not keywords, from a natural-language query with optional kind and jurisdiction filters. Pair with lexical search; embedded coverage is limited.

Instructions

Meaning-based entity search over the corpus (BGE-M3 vector ANN over the resolved dossier cards). Finds companies and people whose profile is semantically closest to a natural-language query — a description, a role, a risk pattern — even when no keyword matches. Optional kind (Company/Person/Asset) and jurisdiction (ISO code) filters. Returns entity_id, caption, kind, jurisdiction, risk and a similarity score; feed entity_id into get_dossier / trace_ownership_path. TODAY THIS IS EFFECTIVELY A RISK-LIST SEARCH, NOT A CORPUS SEARCH. The response carries its own coverage object — read it, it is authoritative and it moves. Measured 2026-08-11: embedded 990,055 of a 47,486,969 universe (ratio 0.0208), and per the endpoint's own note that embedded slice is ~99.6% risk-listed and ~97% natural persons. So a query about an ordinary trading company will return sanctioned people and vessels that merely sound related — verified: 'sanctioned russian aluminium holding' returned RU sanctioned SHIPS as its top hits. An empty or off-target result means 'not embedded yet' far more often than 'not found'. ALWAYS pair this with search_entities, which is lexical and covers the full corpus, before concluding anything about an entity's existence. Latency: 6.4s measured on a cold k=5 call — budget for it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "semantic_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
kNoMax hits (default 10).
kindNoOptional entity-kind filter (Company / Person / Asset / …).
queryYesNatural-language search, e.g. 'sanctioned Russian aluminium holding company'.
jurisdictionNoOptional ISO jurisdiction filter (e.g. GB, RU).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.11

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), yet the description adds materially: measured coverage of 990,055 of 47,486,969, a ~99.6% risk-listed / ~97% natural-persons skew in the embedded slice, a verified failure example, the rule that empty results usually mean 'not embedded yet', and a 6.4s cold-call latency budget. It also flags that the response carries an authoritative, moving `coverage` object.

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 in the first sentence, the trap warning follows, and the remediation ('pair with search_entities') closes. It is long and occasionally emphatic in caps, but nearly every sentence carries decision-relevant information; only the mechanism detail (BGE-M3 vector ANN) is arguably surplus for the caller.

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?

No output schema exists, and the description compensates by naming the returned fields (entity_id, caption, kind, jurisdiction, risk, similarity), telling the agent to read the `coverage` object, and describing a downstream hand-off into get_dossier / trace_ownership_path. For a high-traffic search tool with a severe data caveat, nothing an agent needs is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents all four parameters and the baseline is 3. The description adds meaning beyond the literal schema by characterizing what `query` accepts conceptually (a description, a role, a risk pattern) and by stating the kind/jurisdiction filters are optional and ISO-coded, which helps the agent compose queries rather than just fill fields.

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?

States a specific verb and resource ('meaning-based entity search over the corpus'), names the underlying mechanism (BGE-M3 vector ANN over resolved dossier cards), and explicitly distinguishes itself from the lexical sibling search_entities. An agent knows exactly what this tool is and is not before reading the schema.

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?

Gives explicit when-to-use ('even when no keyword matches'), when-not (a query about an ordinary trading company will surface risk-listed noise), and a named alternative with the instruction to ALWAYS pair with search_entities before concluding an entity does not exist. This is the rare definition that routes the agent correctly.

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