Skip to main content
Glama

Ragmir expand: Ragmir

ragmir_expand
Read-onlyIdempotent

Expands a search citation into the full indexed text, including neighboring chunks, so you can quote or verify a passage before relying on it.

Instructions

Read the full indexed text of one citation from the "Ragmir" knowledge base: the cited chunk plus up to 3 neighbouring chunks on each side, within the output budget. Use it after ragmir_search to quote or verify a passage before relying on it. To read a whole document, expand the returned nextCitation (or previousCitation) with the same contextRadius until it is absent; documentChunks counts the document's chunks. Read-only; reports found:false when the citation is no longer in the index.

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": {
      "citation": "<citation>"
    },
    "name": "ragmir_expand"
  }
}

Input Schema

NameRequiredDescriptionDefault
citationYesA citation from ragmir_search, such as docs/runbook.md:L12-L18#4 or specs/brief.pdf:p3#2.
maxBytesNoOutput budget in bytes for this call; the server caps it at its configured maximum.
contextRadiusNoNeighbouring chunks to include on each side, 0 to 3.
expectedEvidenceIdNoThe evidence id ragmir_search returned with that citation. If the indexed passage has changed since, the call fails with EVIDENCE_CHANGED instead of returning other text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv6.15.0
    • addedInput schema / properties / citation / description
      Added value: +"A citation from ragmir_search, such as docs/runbook.md:L12-L18#4 or specs/brief.pdf:p3#2."
    • addedInput schema / properties / contextRadius / description
      Added value: +"Neighbouring chunks to include on each side, 0 to 3."
    • addedInput schema / properties / expectedEvidenceId / description
      Added value: +"The evidence id ragmir_search returned with that citation. If the indexed passage has changed since, the call fails with EVIDENCE_CHANGED instead of returning other text."
    • addedInput schema / properties / maxBytes / description
      Added value: +"Output budget in bytes for this call; the server caps it at its configured maximum."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, and the description adds value on top: the server-imposed output budget, the found:false outcome for citations no longer indexed, and the continuation protocol via nextCitation/previousCitation and documentChunks. It does not cover cost, latency, or the full response shape, which keeps it just 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.

Conciseness5/5

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

Three tightly packed sentences, front-loaded with the core action followed by usage, then the document-walk procedure and the failure mode. No filler and no restatement of the title or name.

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?

With no output schema, the description does substantial work by naming the returned keys (nextCitation, previousCitation, documentChunks, found) that drive continuation. It stops short of describing the full result object (e.g. the evidence id echoed back), so a small gap remains for a read tool with four parameters.

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 description coverage is already 100%, so the baseline is 3; the description earns an uplift by explaining how contextRadius interacts with returned nextCitation/previousCitation to walk a document and how documentChunks bounds that walk. It adds little on maxBytes beyond restating the server cap, so not a 5.

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?

The description names a specific verb and resource ('Read the full indexed text of one citation') and scopes it precisely: the cited chunk plus up to 3 neighbouring chunks within a byte budget. It explicitly positions itself after ragmir_search, so an agent can distinguish it from the search sibling without opening either 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?

States when to use it ('after ragmir_search to quote or verify a passage before relying on it') and gives an explicit procedure for the adjacent goal of reading a whole document by repeatedly expanding nextCitation until it is absent. That is effectively a when-to-use plus an alternative-path rule, not just an implied context.

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