Skip to main content
Glama
arxiv-query-mcp

arxiv-query-mcp

by LWaetzig

Read arXiv paper text

arxiv_fetch_paper_text
Read-onlyIdempotent

Extracts readable text from an arXiv paper by using its HTML version or PDF, falling back to abstract and metadata. Reads long papers in paged chunks via character offsets.

Instructions

Fetch the readable text content of an arXiv paper.

First tries the HTML version of the paper (available for most papers submitted after ~2023 with LaTeX source). Without one, the text is extracted from the PDF instead. Only if neither works does it return the full abstract and metadata.

Use arxiv_get_paper first to find the paper ID, then call this tool to read the paper's content.

Args: params (FetchPaperTextInput): - paper_id (str): arXiv paper ID, e.g. '2303.08774'; add a version suffix ('2303.08774v1') to read that version instead of the latest - offset (int): Character offset to start from (default 0) - response_format (str): markdown | json

Returns: str: One page of extracted paper text (about 10,000 characters) or the full abstract with links when no text can be extracted. Long papers span several pages: when more text remains, the response reports the next offset; call again with that offset to continue.

JSON schema when response_format='json' (text available):
{ "id", "source", "format" ("html" | "pdf"), "total_chars", "offset", "count", "has_more",
  "next_offset", "text" }

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": {
      "params": "<params>"
    },
    "name": "arxiv_fetch_paper_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.2.0
    • addedInput schema / $defs / FetchPaperTextInput / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Character offset to start reading from (0-based). Pass the next_offset reported by the previous call to read the next part.",
      +  "minimum": 0,
      +  "title": "Offset",
      +  "type": "integer"
      +}
    • changedInput schema / $defs / FetchPaperTextInput / properties / paper_id / description
      Previous value: -"arXiv paper ID, e.g. '2303.08774'. Use arxiv_get_paper first to confirm the ID."New value: +"arXiv paper ID, e.g. '2303.08774'. Add a version suffix ('2303.08774v1') to read that version instead of the latest. Use arxiv_get_paper first to confirm the ID."
  2. First observedv0.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, and the description adds genuinely new behavior: the three-tier source fallback, the ~10,000 character page size, and the next_offset continuation contract. It also discloses what happens when nothing can be extracted (abstract plus links), which is not in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

Front-loaded and well-sectioned with Args/Returns headings, but it is longer than needed: the Args block duplicates schema property text, and the embedded JSON key listing restates an output schema that already exists and is visible to the agent.

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?

For a paginated fetch tool this is complete: it explains source selection order, page size, continuation via next_offset, the degraded abstract-only path, and the JSON response shape. An agent can call it repeatedly and interpret every outcome without further guessing.

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?

The reported schema coverage is 0%, so the description bears the documentation burden and does so: paper_id format with version-suffix semantics, offset as a 0-based character position, and response_format as markdown|json. It adds the JSON field layout for json mode, though the Args block largely restates what the underlying schema properties already say.

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 ('Fetch the readable text content of an arXiv paper') and immediately scopes it against siblings by naming arxiv_get_paper as the ID-lookup step. The fallback chain (HTML, then PDF, then abstract) further distinguishes it from search/list tools.

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?

Gives an explicit workflow prerequisite: 'Use arxiv_get_paper first to find the paper ID, then call this tool.' It also tells the agent how to continue paginated reading ('call again with that offset'), so the when-and-how are both covered rather than inferred.

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