Skip to main content
Glama

Search Passages

search_passages
Read-onlyIdempotent

Searches the library at passage level using hybrid search over semantic chunks. Returns top passages with item_id, chunk_id, char offsets, snapshot_url (permanent R2 archive), saved_at, and score. Has a max_chars budget to control response size. Use this when you need precise citations with permanent links that survive link rot. For item-level results, use search_library instead.

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": "search_passages"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNoFilter by a specific tag.
modeNohybrid
tagsNoFilter by multiple tags (AND).
limitNoMax passages to return.
queryYesSearch query terms or semantic question.
cursorNoOpaque cursor for pagination.
fieldsNoProjection: fields to include in response.
tags_allNoOnly items carrying ALL of these tags. Child tags linked via parent count ('/' is disallowed in tag names).
tags_anyNoOnly items carrying ANY of these tags. Child tags linked via parent count ('/' is disallowed in tag names).
untaggedNoOnly items without any tag.
max_charsNoTotal character budget for all passages combined (~4 chars/token).
tags_noneNoExclude items carrying any of these tags. Child tags linked via parent count ('/' is disallowed in tag names).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / tags_all / description
      Previous value: -"Only items carrying ALL of these tags. Child tags count: 'work' also matches 'work/research'."New value: +"Only items carrying ALL of these tags. Child tags linked via parent count ('/' is disallowed in tag names)."
    • changedInput schema / properties / tags_any / description
      Previous value: -"Only items carrying ANY of these tags. Child tags count: 'work' also matches 'work/research'."New value: +"Only items carrying ANY of these tags. Child tags linked via parent count ('/' is disallowed in tag names)."
    • changedInput schema / properties / tags_none / description
      Previous value: -"Exclude items carrying any of these tags. Child tags count."New value: +"Exclude items carrying any of these tags. Child tags linked via parent count ('/' is disallowed in tag names)."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered; the description adds real behavioral context on top: the shape of each returned passage, that snapshot_url is a permanent R2 archive, and that max_chars caps total response size. It stops short of explaining how the three search modes behave differently or how cursor pagination interacts with the char budget, which keeps it off a 5.

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?

Five tight sentences in a deliberate order: what it does, what it returns, the budget, when to choose it, and which sibling to use otherwise. No sentence is filler, and the disambiguating guidance sits at the point of decision rather than buried.

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?

For a 12-parameter read tool with 92% schema coverage and no output schema, the description compensates by enumerating the returned fields and the archive nature of snapshot_url. Combined with annotations that declare the safe read profile, an agent has everything needed to call it correctly and interpret the result.

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 coverage is 92%, so the schema already documents the tag filters, limit, fields, cursor and max_chars. The description contributes only a light framing of max_chars as response-size control and hints at the 'hybrid' default via 'hybrid search', without clarifying what the keyword or semantic modes do differently. Baseline 3 is appropriate when the schema carries the parameter burden.

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 ('searches the library') plus the granularity that matters ('at passage level') and the mechanism ('hybrid search over semantic chunks'). It explicitly contrasts itself with the item-level sibling, so an agent can distinguish it from search_library without opening a 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?

Names the selecting condition precisely ('when you need precise citations with permanent links that survive link rot') and routes the alternative case to a specific sibling ('For item-level results, use search_library instead'). Both when-to-use and which-alternative are stated, leaving little to inference.

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.