Skip to main content
Glama
kengo006

semantic-search

by kengo006

semantic_search

Retrieve text passages by meaning to find paraphrases and cross-lingual matches that keyword searches miss. Returns top fragments with file paths and page numbers for verification.

Instructions

Semantic recall: retrieve text-layer passages by meaning, catching what keyword grep misses (paraphrase and cross-lingual matches).

Returns top-k fragments, each with file (relative path), page_start/page_end (for going back to the source PDF), score (cosine; higher = closer), and text (the fragment itself). ⚠ Recall layer only: verbatim quotes, page numbers, and emphasis must be verified against the source PDF. Never cite these fragments directly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations, so description carries full burden. Discloses return fields (file, page_start/end, score, text), score interpretation (cosine, higher=closer), and critical limitation that fragments are not verbatim and must be verified.

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 paragraphs with bold, bullet-like structure. First sentence front-loads purpose, warning is clearly separated. Every sentence adds value.

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?

Given output schema exists, description adds value by explaining return semantics and limitations. Covers purpose, usage, parameters briefly, and behavioral traits. No gaps.

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 0%, so description must compensate. It explains 'k' as 'top-k' and 'query' implicitly, adding context beyond bare schema. Could explicitly state k is number of fragments, but sufficient.

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?

Clearly states 'retrieve text-layer passages by *meaning*', distinguishing from keyword grep. Specific verb and resource, and contrasts with sibling 'semantic_search_info' (though not detailed).

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?

Explicitly says it catches what 'keyword grep misses', implying when to use it. Provides a warning about recall layer and citation limitations, but does not explicitly contrast with 'semantic_search_info'.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kengo006/alexandria-semantic-recall'

If you have feedback or need assistance with the MCP directory API, please join our Discord server