Skip to main content
Glama

pdf_info

Get PDF metadata—page count, title, author, encryption, and text layer status—to determine if you can read text directly or need OCR for scanned documents.

Instructions

Get PDF metadata: page count, title, author, dates, encryption, page size, file size, and whether the PDF has an embedded text layer (vs scanned-only).

Use this first to decide between pdf_read (text layer) and pdf_view/pdf_ocr (scanned).

Args: source: Local file path or direct http(s) URL to a PDF.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosure. It honestly states that the tool only retrieves metadata and returns information about the text layer, which implies it is read-only. It also reveals a useful behavioral aspect: distinguishing between embedded text and scanned-only pages. However, it does not mention potential error conditions (e.g., network failures for URLs) or any rate limits, but these are not critical for a metadata query.

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 compact and well-structured. It leads with the core purpose and metadata list, then provides usage guidance in a single sentence, and finally documents the argument. Every sentence adds value, and there is no redundancy 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?

Since the tool has an output schema (per context signals), the description does not need to list return values. It adequately covers the tool's function, usage context, and parameter. The only minor gap is the absence of edge-case handling (e.g., what happens with invalid files or URLs), but for a simple metadata tool with one parameter, this is acceptable.

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?

Schema description coverage is 0%, so the description must explain the parameter, and it does: 'source: Local file path or direct http(s) URL to a PDF.' This adds concrete semantics (accepted formats, supported sources) beyond the plain string type in the schema, fully compensating for the lack of schema documentation.

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 states a specific verb ('Get') and a clear resource ('PDF metadata'), then enumerates the exact metadata fields (page count, title, author, dates, encryption, page size, file size, text layer presence). It also distinguishes itself from sibling tools by explicitly mentioning the decision between pdf_read, pdf_view, and pdf_ocr, making its purpose unambiguous.

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?

The description explicitly says 'Use this first to decide between pdf_read (text layer) and pdf_view/pdf_ocr (scanned).' This gives clear when-to-use guidance and names the alternative tools and the condition that routes to each. It leaves no ambiguity about when this tool should be called.

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/Builderstar/openmedia-mcp'

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