Skip to main content
Glama

render_pdf_smart

Read-only

Extract text from prose pages and render only figure or diagram pages as images, returning interleaved text and image blocks to cut token usage when reading PDFs.

Instructions

Smart PDF rendering: extracts text from prose pages and renders only pages with figures/diagrams as images. Far more token-efficient than rendering every page. Returns interleaved text and image content blocks.

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": {
      "path": "<path>"
    },
    "name": "render_pdf_smart"
  }
}

Input Schema

NameRequiredDescriptionDefault
dpiNoResolution for rendered pages
modeNohybrid: text for prose, images for figures (default). render: rasterize every page. text: extract text only.hybrid
pathYesAbsolute path to the PDF file
pagesNoPage range: "all", single page "3", or range "1-5" (1-indexed)all

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false. The description adds meaningful behavior beyond that: the hybrid text/image strategy, the token-efficiency tradeoff, and the return shape of interleaved text and image content blocks. It does not explain figure-detection heuristics or failure behavior, so it is not fully transparent.

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 three sentences, front-loaded with the core behavior, and every sentence adds value: purpose, efficiency rationale, and return format. There is no repetition or filler.

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, four-parameter PDF rendering tool without an output schema, the description covers what is read, why it is efficient, and how content blocks are returned. The schema covers parameter details, leaving only edge-case and failure behavior undocumented.

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 description coverage is 100%, and the mode enum is fully documented in the schema. The description reinforces the prose-vs-figure split but adds no parameter syntax, defaults, or constraints beyond what the schema already provides, so the baseline of 3 is appropriate.

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 ('PDF rendering') and precisely scopes the behavior: extracts text from prose pages and renders only pages with figures/diagrams as images. It also implicitly distinguishes itself from rendering every page, so an agent can tell what this does compared with a full-page renderer.

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 efficiency comparison ('Far more token-efficient than rendering every page') implies this is the preferred default for mixed PDFs, but it does not explicitly say when to choose it over render_pdf or when to prefer alternate modes. No exclusions or explicit alternatives are given.

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