Skip to main content
Glama
Xvvln

io.github.Xvvln/pdf-reader-mcp

by Xvvln

get_pdf_text_stats

Get text statistics from PDF files: word count, character count, paragraphs, pages, averages, and scanned PDF detection. Supports optional page range.

Instructions

获取PDF文本的统计信息(字数、字符数、段落数等)。

Args: file_path: PDF文件的完整路径 pages: 要统计的页码范围(可选,默认全部页面)

Returns: 包含以下信息的字典: - total_pages: 总页数 - analyzed_pages: 分析的页数 - total_characters: 总字符数 - total_characters_no_space: 不含空格的字符数 - total_words: 总词数(按空格分割) - total_lines: 总行数 - total_paragraphs: 总段落数 - avg_chars_per_page: 平均每页字符数 - avg_words_per_page: 平均每页词数 - is_likely_scanned: 是否可能是扫描版PDF

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesNo
file_pathYes
Behavior4/5

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

With no annotations, the description relies entirely on its own text. It thoroughly details return values (including 'is_likely_scanned') and implies safe, read-only behavior. However, it omits potential performance impacts or file access requirements.

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 description is front-loaded with the main purpose and uses a clear Args/Returns structure. It is concise, though the Returns section could be slightly trimmed; overall, every sentence adds value.

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 relatively simple tool with two parameters and no output schema, the description covers all necessary information: parameter explanations and a detailed list of return fields. It is complete for effective agent invocation.

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?

Despite 0% schema coverage, the description fully compensates by defining each parameter: 'file_path' as the full path and 'pages' as an optional page range (default all pages). This adds meaning beyond the schema's minimal titles.

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 clearly states the tool's function: retrieving PDF text statistics (word count, character count, etc.). It distinguishes itself from siblings like 'read_pdf_as_text' (extraction) and 'get_pdf_info' (metadata) by focusing solely on analytical metrics.

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 does not provide explicit guidance on when to use this tool versus alternatives. It only states what it does, leaving the agent to infer appropriate usage without mentioning exclusions or contexts.

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/Xvvln/pdf-reader-mcp'

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