Skip to main content
Glama
mcp-server-paperless

mcp-server-paperless

Get document content

get_document_content
Read-onlyIdempotent

Read a document's OCR text in character-limited slices and pass offsets to continue through long content; search full text first to locate needed passages.

Instructions

Read the OCR text of a document in slices of max_chars characters (default 20000).

total_chars is the length of the whole text; while next_offset is set, pass it as offset to read on. An offset past the end returns an empty slice with total_chars. Prefer search_documents with a full-text query to find the passage you need first.

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": {
      "document_id": "<document_id>"
    },
    "name": "get_document_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
offsetNoCharacter offset to start at.
max_charsNoCharacters to return, at most 20000.
document_idYesDocument id, from search_documents.

Output Schema

NameRequiredDescriptionDefault
offsetYesWhere the slice starts, in characters.
contentYes
web_urlYesLink to the document in the Paperless web UI.
document_idYes
next_offsetYesOffset of the next slice, null at the end of the text.
total_charsYesLength of the whole text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.2

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/closed-world, so the bar is lower, yet the description still discloses the pagination contract (total_chars = full length, next_offset drives continuation) and the edge case that an offset past the end returns an empty slice with total_chars. Those are behavioral facts an agent cannot derive from the annotations or schema alone.

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?

Three short sentences with no waste: purpose and slice size first, then the continuation protocol, then the preferred alternative. Front-loading the read-loop mechanics before the routing hint matches how an agent will actually use it.

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 three-parameter read with an output schema, the description covers the only genuinely ambiguous part — how to page through a large document — and adds a sibling routing hint. Nothing needed to call it correctly is missing, and return values are left to the output schema as appropriate.

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% and both offset and max_chars are already documented in the schema, so the baseline is 3. The description adds real meaning on top by explaining offset as a continuation token derived from next_offset and reiterating that max_chars bounds the slice, but it adds no format or encoding caveats beyond that.

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 opens with a specific verb and resource ("Read the OCR text of a document") and states the delivery mechanism ("in slices of max_chars characters (default 20000)"). That is enough to distinguish it from get_document (metadata) and search_documents (retrieval by query), which is named explicitly.

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?

It gives an explicit routing rule: "Prefer search_documents with a full-text query to find the passage you need first," plus a concrete read-loop instruction ("while next_offset is set, pass it as offset to read on"). When-to-use, how-to-continue, and the preferred alternative are all stated rather than inferred.

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