Skip to main content
Glama
elpaca

ai-papers-mcp

by elpaca

grep_paper_content

Read-onlyIdempotent

Run grep commands against a paper's full markdown text to locate sections, equations, or keywords with context.

Instructions

Grep patterns in the full converted markdown text of a paper. Pipes the paper's parsed markdown as stdin to the given grep command.

Returns the stdout of the grep command.

Args:
    title: Paper title (supports fuzzy matching, but provide as accurately as possible).
    grep_command: Full grep command to run. Paper markdown is piped as stdin. Examples:
        - 'grep -A 150 "3 METHODOLOGY"' to read a whole section
        - 'grep -i -C 3 "learning rate"' shows 3 lines of context around it
        - 'grep -A 10 "Equation 1"' to locate equations or figures
        Note: First call `get_paper_toc` to get the exact section names (e.g., "3 METHODOLOGY", "4.2 Baseline").
    max_chars: Max output characters (default 6000).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
max_charsNo
grep_commandYes
Behavior4/5

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

Annotations already declare this as a safe, read-only, idempotent operation, so the bar is lower. The description adds useful behavioral detail: it pipes markdown as stdin, returns stdout, enforces a max_chars limit, and explains fuzzy title matching. This enriches the annotation-only picture without contradicting it.

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 well-structured: a one-sentence purpose statement, a clear return line, and then parameter explanations with call-worthy examples. Every sentence earns its place without fluff, making it both concise and informative.

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?

Given the tool's simplicity and lack of output schema, the description covers all essential aspects: how it works (stdin piping), what it returns (stdout), parameters, usage tips, and output limits. The note to call get_paper_toc first completes the workflow guidance. It is complete for this tool.

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

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden. It explains each parameter thoroughly: title with fuzzy matching, grep_command with multiple examples including a recommendation to use the TOC first, and max_chars with its default. This fully compensates for the empty schema descriptions.

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 greps patterns in a paper's full markdown text by piping it to a user-supplied grep command. This specific verb+resource clearly distinguishes it from sibling tools like search_library_papers or get_paper_toc, which operate at a higher level.

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?

The description gives clear practical context with concrete examples (reading sections, finding context) and advises calling get_paper_toc first for exact section names. However, it does not explicitly name alternative tools or state when not to use this tool, so it falls short of the highest level of guidance.

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/elpaca/ai_papers_helper'

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