Skip to main content
Glama

retrieve_index

Preview which context nodes a retrieval call would return without loading full bodies. Get IDs, titles, tiers, tags, and body costs, then follow with fetch_nodes to fetch selected content.

Instructions

Preview what retrieve_context would return, without the bodies.

Returns ids, titles, tiers, tags and what each body would cost. Follow with fetch_nodes. tags narrows it to nodes carrying at least one of them; the reserved ones are decision, bugfix, security_alert, sensitive. exclude_tags does the opposite - drop any node carrying at least one of them.

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": {
      "anchor": "<anchor>"
    },
    "name": "retrieve_index"
  }
}

Input Schema

NameRequiredDescriptionDefault
hopsNo
tagsNo
anchorYes
hub_cutoffNo
exclude_tagsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.6.0
    • addedInput schema / properties / exclude_tags
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Exclude Tags"
      +}
  2. Addedv1.2.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does well on output shape (metadata only, no bodies, plus per-body cost) and names the reserved tag vocabulary. It does not state read-only semantics, result limits, pagination, or how much the traversal widens with hops/hub_cutoff.

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 one-line purpose, then output shape, then workflow hint, then filter semantics. Tight and free of filler, though the filter explanation could be compressed into a single clause pair.

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

Completeness2/5

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

There is no output schema, so the description's enumeration of returned fields does real work. But for a graph-traversal tool, leaving anchor, hops and hub_cutoff undefined is a serious gap — an agent cannot size the traversal or know what hub_cutoff suppresses before calling.

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

Parameters2/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. It explains tags, exclude_tags and the four reserved tag values well, but says nothing about anchor, hops or hub_cutoff — three of five parameters, including the required one, are left entirely unexplained.

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 (preview) against a named sibling (retrieve_context) and enumerates what comes back: ids, titles, tiers, tags and per-body cost. An agent can tell immediately this is the cheap metadata pass and that retrieve_context is the full-body call.

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?

Gives a sequence ("Follow with fetch_nodes") and implicitly positions the tool as the preview step before retrieve_context. It also explains the two filter parameters' polarity (tags keeps, exclude_tags drops). No explicit when-not-to-use or cost threshold for skipping the preview, which keeps it from a 5.

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