Skip to main content
Glama
yuplin2333

MCP Long Context Reader

by yuplin2333

retrieve_with_rag

Retrieves relevant passages from a long document or text using RAG, enabling targeted search without loading full content. Provide a query and a file path or text to get matching sections.

Instructions

Retrieves relevant passages from a document or string based on a query using RAG.
Exactly one of context_path or context_text must be provided. Do NOT provide both.

Args:
    context_path (str): The path to the context file.
    context_text (str): The text content to search.
    query (str): The query to search for.

Returns:
    str: A string containing the relevant passages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo
context_pathNo
context_textNo
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool performs a read-only retrieval operation and enforces a mutual-exclusion rule for context inputs. However, it does not mention potential side effects, limitations of RAG, or what 'relevant' means. It is adequately transparent for a simple retrieval tool but lacks depth.

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?

The description is compact and well-structured: a single sentence for purpose, one sentence for the key constraint, then clean Args and Returns sections. Every sentence adds value, with no filler or repetition.

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?

For a tool with 3 parameters, no output schema, and no annotations, the description provides sufficient information for invocation: purpose, parameters, constraint, and return type. It does not explain RAG concepts or alternative use cases, but it is functionally complete for an agent to select and call the tool correctly.

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?

Since schema description coverage is 0%, the description compensates by explaining each parameter's meaning: context_path ('path to the context file'), context_text ('text content to search'), and query ('query to search for'). It also clarifies the exclusivity rule. However, it does not explicitly state whether query is required or optional, leaving slight ambiguity.

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 clearly states the tool's function with a specific verb ('Retrieves'), a specific resource ('relevant passages from a document or string'), and a mechanism ('using RAG'). This distinguishes it from sibling tools like summarize_with_map_reduce and search_with_regex, which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description includes a crucial usage constraint ('Exactly one of context_path or context_text must be provided. Do NOT provide both.'), but it does not explicitly discuss when to use this tool versus alternatives. Usage is implied by the description's clarity about what it does, but no explicit when-to-use or when-not-to-use guidance is given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yuplin2333/mcp-long-context-reader'

If you have feedback or need assistance with the MCP directory API, please join our Discord server