Skip to main content
Glama

retrieve_index

Preview what retrieve_context WOULD return, without paying for the bodies. Same traversal, same nodes, but each entry is just id, title, tier, tags and approx_tokens - what reading that one node would cost.

Instructions

Preview what retrieve_context WOULD return, without paying for the bodies. Same traversal, same nodes, but each entry is just id, title, tier, tags and approx_tokens - what reading that one node would cost. Follow up with fetch_nodes(ids) for the ones worth reading.

Prefer this over retrieve_context when the topic is broad, when you only need one specific thing from a wide neighborhood, or when retrieve_context's approx_tokens came back larger than you want to spend. Prefer retrieve_context when the neighborhood is small or you intend to read most of it - two round trips to save a few hundred tokens is a worse deal than one round trip.

tags optionally narrows to nodes carrying any of them; the reserved ones are "decision", "bugfix", "security_alert" and "sensitive".

Input Schema

NameRequiredDescriptionDefault
hopsNo
tagsNo
anchorYes
hub_cutoffNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does so well: it discloses the exact return shape per entry (id, title, tier, tags, approx_tokens), the cost model (no bodies), and the traversal equivalence to retrieve_context. It does not mention auth, rate limits, or error behavior, so it stops short of 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.

Conciseness4/5

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

Front-loaded with the core 'preview without paying for bodies' framing, then guidance, then parameter notes. The round-trip cost justification is slightly chatty but adds decision-relevant reasoning rather than filler.

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?

No output schema exists, so the description must explain returns - and it does precisely (per-entry fields and approx_tokens meaning). The remaining gap is the three undocumented traversal parameters (anchor, hops, hub_cutoff), which an agent would have to guess at.

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 0%, so the description must compensate, and it only partially does. It fully explains `tags` including the reserved values (decision, bugfix, security_alert, sensitive), but `anchor`, `hops`, and `hub_cutoff` are never described despite being non-obvious traversal controls.

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 (preview retrieve_context results) and immediately distinguishes itself from the sibling retrieve_context by contrasting what each returns (index entries vs. bodies). An agent can tell exactly what this does and how it differs from the closest alternative without opening 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?

Explicitly names when to prefer this tool (broad topic, need one item from a wide neighborhood, cost too high) and when to prefer retrieve_context (small neighborhood, reading most of it), plus the follow-up pattern with fetch_nodes(ids). This is a full when/when-not/alternative routing.

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