Skip to main content
Glama
PDF Action Inspector

PDF Action Inspector

Official

Get Page Index By Pdfobjnum

get_page_index_by_pdfobjnum

Locate the page index that contains a specified PDF object number in a file, so you can trace objects to pages during PDF Action inspection and security analysis.

Instructions

Find the page containing object by PDF object number

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_path": "<file_path>",
      "obj_num": "<obj_num>"
    },
    "name": "get_page_index_by_pdfobjnum"
  }
}

Input Schema

NameRequiredDescriptionDefault
obj_numYesPDF object number
file_pathYesPDF file path

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, but it only says the tool finds a page. It does not disclose prerequisites such as whether the PDF must be loaded or decrypted, error behavior when the object number is absent, or whether the result is zero-based.

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?

It is a single, front-loaded sentence with no filler. The wording is compact and every word contributes to the lookup description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter lookup with an output schema, the essential operation is stated. However, with no annotations and no usage guidance, the description leaves gaps around prerequisites and failure conditions that would matter to an agent invoking it.

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 the schema already explains file_path and obj_num. The description adds no meaning beyond restating that obj_num identifies the object whose page is sought; baseline 3 is appropriate.

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 a clear verb and resource: find the page containing an object, keyed by PDF object number. It is specific enough to distinguish this lookup from sibling text/annotation/field operations, though it does not explicitly say the return value is a page index.

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?

There is no explicit when-to-use or when-not-to-use guidance and no named alternative. The usage is only implied by the phrase 'by PDF object number'.

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