Skip to main content
Glama
pdf4me
by pdf4me

AI-Process Pay Stub

process_pay_stub

Extract structured data from pay stub images or PDFs. Uses AI to parse and return key fields as JSON, simplifying payroll data capture.

Instructions

AI-Process Pay Stub: extract structured data from a pay stub image/PDF via PDF4me POST /api/v2/ProcessPayStub. Body uses IsAsync (must be true) and CustomFieldKeys (PascalCase) only when custom_field_keys is non-empty—omit CustomFieldKeys when unused. Provide pdf_file_path (local .pdf/.png/.jpg/.jpeg as Base64). doc_name optional (defaults to basename); names without an extension get .png. 202 + Location poll; saves process_pay_stub.json.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_nameNo
output_dirNo
pdf_file_pathNo
custom_field_keysNo
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 substantial work: it discloses the async nature (202 + Location poll), the IsAsync=true requirement, the conditional omission of CustomFieldKeys, file format constraints, default doc_name behavior, and that output is saved to process_pay_stub.json. Missing details like auth, rate limits, and error handling prevent a 5.

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 dense but each clause adds value: purpose, endpoint, key body constraints, file handling, async behavior, and output file. It is front-loaded with purpose and then provides operational details. The single run-on structure is slightly awkward, but nothing is wasted.

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 tool with no output schema and no annotations, the description covers core behavior well (async, polling, file naming, side-effect output). Yet it omits output_dir semantics and any outline of the structured data returned, leaving gaps that could cause incorrect invocation or misinterpretation of results.

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 0%, so the description must compensate. It adds meaning for pdf_file_path (local file, Base64, allowed extensions), doc_name (defaults to basename, .png fallback), and custom_field_keys (PascalCase, omit when empty). However, output_dir is completely absent from the description, leaving a meaningful parameter undocumented.

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 operation: 'extract structured data from a pay stub image/PDF' via a named API endpoint (PDF4me POST /api/v2/ProcessPayStub). This is a specific verb+resource pairing that distinguishes it from sibling tools like process_invoice or process_receipt by focusing on pay stubs.

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

Usage Guidelines3/5

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

The description implies when to use the tool ('extract structured data from a pay stub'), but it does not explicitly state alternatives or exclusions. It provides technical usage context (async, polling, accepted file types) but stops short of saying 'use this instead of process_invoice' or listing prerequisites beyond a file path.

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/pdf4me/pdf4me-mcp'

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