Skip to main content
Glama

get_page_image

Convert PDF pages to PNG images for text extraction, diagram analysis, or content sharing. Specify page number and resolution to render PDF content as visual files.

Instructions

Render a single PDF page as a PNG image.

Args:
    filename: Path to a PDF file.
    page: Page number (1-indexed).
    dpi: Image resolution. Default 150 (good balance of readability and size).
    output: "base64" returns the image inline as MCP image content.
            "file" writes to a temp file and returns the path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
pageNo
dpiNo
outputNobase64
Behavior3/5

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

With no annotations provided, the description carries the full burden. It successfully discloses the 1-indexed page numbering and the behavioral difference between 'base64' (inline MCP content) and 'file' (temp path) output modes. However, it omits safety declarations (read-only vs. destructive), error handling for invalid pages, and temp file cleanup behavior.

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

Conciseness4/5

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

The Args-section structure efficiently organizes parameter documentation. While slightly programmatic in tone, every sentence earns its place—particularly the DPI guidance explaining the trade-off between readability and file size. No redundant information.

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?

Given zero schema coverage and no output schema, the description adequately covers inputs and explains return value behaviors (base64 vs file path). Minor gaps remain regarding error conditions and file system safety (read-only nature).

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?

With 0% schema description coverage (titles only), the description comprehensively compensates by documenting all four parameters: filename as 'Path to a PDF file', page as '1-indexed', dpi with resolution guidance and rationale for the default, and output with detailed enum semantics.

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?

The description states 'Render a single PDF page as a PNG image', providing a specific verb (render), resource (PDF page), and output format (PNG). The 'single' qualifier and image format implicitly distinguish it from sibling get_page_text and get_pdf_info, though it does not explicitly contrast with alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to select this tool versus siblings like get_page_text (visual analysis vs. text extraction) or search_text. It explains the 'how' of the output parameter but not the 'when' of tool selection.

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/I-CAN-hack/pdf-mcp'

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