Skip to main content
Glama

Ragmir search: Ragmir

ragmir_search
Read-only

Search a local knowledge base for cited passages, batch up to five related questions in one call, and return compact citations or full text so agents can ground answers or report missing evidence.

Instructions

Search the "Ragmir" knowledge base (/app) for cited passages. Returns compact citations by default; send related questions together in queries (up to 5) to share one budget. Passages already returned in this session come back as short seen stubs. Each result has a citation (path, lines or page, chunk), an excerpt, and weakEvidence when support is thin; an empty result means the base holds no evidence, so say so instead of guessing. Expand one citation, or set compact:false, only when full text is needed.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ragmir_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
seenNoPassages already returned in this session: collapse (default) to short stubs, include them in full again, or exclude them.
topKNoPassages per question. Default 3; the server caps it.
queryNoOne question, in natural language or with exact identifiers.
scopeNoA named source scope from the config; ragmir_status lists them.
compactNoDefault true: citations with short excerpts. false returns full passage text.
explainNoAdds the retrieval query and ranking signals; signals, not confidence.
queriesNoInstead of query: up to 5 related questions answered together in one output budget.
maxBytesNoOutput budget in bytes for this call; the server caps it at its configured maximum.
contextPathsNoLimit hits to these heading paths, such as "Guide > Migration".
excludePathsNoSkip files under these project-relative paths or globs.
includePathsNoSearch only files under these project-relative paths or globs.
contextRadiusNoNeighbouring chunks added on each side of a hit, 0 to 3.
maxChunksPerDocumentNoMost passages returned from one file. Default 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv6.15.0
    • addedInput schema / properties / compact / description
      Added value: +"Default true: citations with short excerpts. false returns full passage text."
    • addedInput schema / properties / contextPaths / description
      Added value: +"Limit hits to these heading paths, such as \"Guide > Migration\"."
    • addedInput schema / properties / contextRadius / description
      Added value: +"Neighbouring chunks added on each side of a hit, 0 to 3."
    • addedInput schema / properties / excludePaths / description
      Added value: +"Skip files under these project-relative paths or globs."
    • addedInput schema / properties / explain / description
      Added value: +"Adds the retrieval query and ranking signals; signals, not confidence."
    • addedInput schema / properties / includePaths / description
      Added value: +"Search only files under these project-relative paths or globs."
    • addedInput schema / properties / maxBytes / description
      Added value: +"Output budget in bytes for this call; the server caps it at its configured maximum."
    • addedInput schema / properties / maxChunksPerDocument / description
      Added value: +"Most passages returned from one file. Default 1."
    • addedInput schema / properties / queries / description
      Added value: +"Instead of query: up to 5 related questions answered together in one output budget."
    • addedInput schema / properties / query / description
      Added value: +"One question, in natural language or with exact identifiers."
    • addedInput schema / properties / scope / description
      Added value: +"A named source scope from the config; ragmir_status lists them."
    • addedInput schema / properties / seen / description
      Added value: +"Passages already returned in this session: collapse (default) to short stubs, include them in full again, or exclude them."
    • addedInput schema / properties / topK / description
      Added value: +"Passages per question. Default 3; the server caps it."
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare read-only/open-world safety; the description adds behavior the agent cannot otherwise know, including session-level deduplication (seen stubs), the weakEvidence marker for thin support, budget sharing across batched queries, and server-side caps on topK and maxBytes. Empty-result semantics are spelled out, which directly changes agent behavior on failure.

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?

Front-loads the core action, then moves through output shape, batching, dedup, and expansion guidance in a tight sequence with no filler sentences. Every clause carries operational information an agent needs at call time.

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?

Despite 13 parameters and no output schema, the description describes the return shape (citation, excerpt, weakEvidence) and the degraded cases, so the missing output schema is compensated. Nothing an agent needs to call this correctly or interpret results is absent.

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 100%, so the baseline is 3; the description earns more by explaining that queries trades off against query under a single budget and that compact:false yields full passage text instead of citations. Other parameters such as contextPaths, excludePaths, and contextRadius are left to the schema, which is acceptable given full coverage.

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 ("Search the Ragmir knowledge base (/app) for cited passages") and separates itself from siblings by pointing to citation expansion for full text and to ragmir_status for scopes. An agent can distinguish this from ragmir_expand or ragmir_status 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete usage steering: batch related questions in queries (up to 5) to share one budget, request full text only when needed, and report an empty result as no evidence rather than guessing. It lacks an explicit statement of when NOT to search here and defers alternative-tool routing to implication rather than naming ragmir_expand outright.

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