Skip to main content
Glama
ypolosov

pageindex-mcp

by ypolosov

Index PDF Document

index_document

Convert a local PDF into a hierarchical PageIndex tree for navigation and content extraction without LLM calls during search.

Instructions

Converts a local PDF into a PageIndex hierarchical tree structure. This is a one-time operation per document. Requires: PAGEINDEX_REPO_PATH env var pointing to cloned VectifyAI/PageIndex repo, and OPENAI_API_KEY for tree generation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYesUnique identifier for this document (alphanumeric, hyphens, underscores)
pdf_pathYesAbsolute path to the PDF file on local filesystem
toc_check_pagesNoPages to scan for table of contents (default: 20)
max_pages_per_nodeNoMax pages per tree node (default: 10)
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the one-time nature and external prerequisites, which are important behavioral traits. It doesn't detail filesystem side effects or failure behavior, but the core behavior is clearly stated.

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?

Two succinct sentences. The first front-loads the main action and output; the second compactly lists prerequisites. Every word earns its place with no redundant content.

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?

Covers purpose, prerequisites, and one-time behavior, and the schema fully documents all parameters. It lacks explicit return-value or error semantics, but the tool's moderate complexity doesn't demand much more.

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?

The input schema covers 100% of parameters with descriptions. The tool description itself adds no parameter-level detail beyond what the schema already provides, so the baseline score 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?

The description uses a specific verb ('Converts') with a clear resource (local PDF) and output (PageIndex hierarchical tree structure). It clearly distinguishes this indexing/write operation from the sibling read/list/delete tools.

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?

States this is a one-time operation per document and lists required environment variables (PAGEINDEX_REPO_PATH, OPENAI_API_KEY), giving clear context for when it applies. It doesn't explicitly name alternatives, but the prerequisites and one-time nature imply when it should be used versus read-only siblings.

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/ypolosov/pageindex-mcp'

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