Skip to main content
Glama
EthanCheung-gh

PDF Inspector MCP

pdf_analyze_fonts

Analyze fonts in a PDF to retrieve per-font usage statistics, including character counts, pages, size ranges, and colors, helping identify prominent text without extracting entire pages.

Instructions

Per-font usage statistics: character count, pages, size range and colours.

Omit both bounds to analyse the whole document. Returns {'fonts': [...]} sorted by charCount descending; each entry has fontname, pages, charCount, sizeMin, sizeMax and colors. Use it to find which text is prominent without extracting whole pages.

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the PDF: absolute, or relative to the server process working directory. Any readable regular file is accepted; the .pdf suffix is not required.
end_pageNoLast page to analyse (1-based, inclusive). Defaults to the last page.
passwordNoPassword for an encrypted PDF. Omit or pass null for unprotected documents.
start_pageNoFirst page to analyse (1-based, inclusive). Defaults to page 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the return envelope, sort order (charCount descending) and every entry field, plus the default page-range behaviour. It stops short of stating read-only/non-mutating nature or what happens on bad page bounds or a wrong password, which the schema only partly covers.

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?

Front-loads what the tool produces, then the scoping rule, then the return shape — a sensible order with little waste. The enumerated return fields are justified by the absence of an output schema, though the RST-style backticks add visual noise.

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?

With no output schema and no annotations, the description correctly carries the return contract (field names, ordering) while the schema covers all parameters, so an agent can call it correctly. Missing only edge-case behavior such as invalid page ranges or encrypted-file failures.

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 coverage is 100%, so path, start_page, end_page and password are already fully documented, including 1-based inclusivity and defaults. The description only adds the 'omit both bounds' shorthand, adding little beyond the schema; baseline 3 applies.

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?

States a specific verb and resource ('per-font usage statistics' with character count, pages, size range and colours), which is concrete and unambiguous. It implicitly separates itself from pdf_extract_page by contrasting prominence analysis with page extraction, though it never names a sibling tool explicitly.

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

Usage Guidelines4/5

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

Gives clear operating context: 'Omit both bounds to analyse the whole document' and 'Use it to find which text is prominent without extracting whole pages' tell the agent both how to scope the call and when this tool beats extraction. No explicit 'do not use for X' exclusion is stated, which keeps it short of a 5.

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