Skip to main content
Glama
arXiv MCP Server

arXiv MCP Server

by MaksPyn

Search within a paper

search_in_paper
Read-only

Finds every occurrence of a word or phrase in an arXiv paper’s full text, downloading it if needed, and returns surrounding context plus the section for each match.

Instructions

Find every occurrence of a word or phrase in a paper's full text (downloaded automatically if needed), with surrounding context and the section it appears in. Plain-text match, not regex.

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": {
      "arxivId": "<arxivId>",
      "query": "<query>"
    },
    "name": "search_in_paper"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesWord or phrase to find
arxivIdYesarXiv ID or URL
maxMatchesNo
contextCharsNoCharacters of context on each side
caseSensitiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A3.6/5.0
Behavior3/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description discloses genuinely useful behavior: the paper is fetched automatically if not already present, and results carry surrounding context plus the section. It still says nothing about ordering of matches, truncation when maxMatches is hit, or whether a total count is returned.

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?

Two sentences, front-loaded with the action and scope, with the download behavior in a parenthetical and the regex exclusion as a clean trailing clarification. Nothing is padded or repeated from the title.

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 read-only, schema-light tool with no output schema, the description covers what it returns (matches, context, section) and the side effect of auto-download. Only result ordering and truncation/limit behavior remain unstated, which are minor for this complexity.

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

Parameters3/5

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

Schema coverage is 60%, so the schema already documents query, arxivId, and contextChars. The description adds real meaning for the matching mode (literal plain text) and implies contextChars feeds the 'surrounding context' return, but leaves maxMatches and caseSensitive entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: find every occurrence of a word or phrase in a paper's full text, returning context and section. The phrasing 'in a paper's full text' implicitly separates it from the corpus-wide search_papers sibling, though it never names an alternative outright.

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 usage context is implied - you need a known arXiv paper and a literal string - but there is no explicit when-to-use or when-not guidance and no named alternative for regex or cross-paper needs. The 'Plain-text match, not regex' clause does eliminate one mis-invocation mode, which keeps it above a bare 2.

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