Skip to main content
Glama
pdf4me
by pdf4me

AI-Process Tax Document

process_tax_document

Extract structured tax data from PDF tax documents using AI. Provide a file path and optional tax model to get JSON output.

Instructions

AI-Process Tax Document (processTaxDocument): extract structured tax data via PDF4me POST /api/v2/ProcessTaxDocument. Body: docName (sent exactly as doc_name—trimmed—or 'tax_document.pdf' if omitted; never replaced by local file basename or URL path in the request), docContent, isAsync (true); optional taxModel (omit when empty or 'none'); customFieldKeys camelCase when keys present (list and/or custom_field_keys_csv merged); optional profiles (sanitized). Provide pdf_file_path (local .pdf/.png/.jpg/.jpeg). tax_model examples: W2, 1099, 1099-SSA, 1040, 1040-SR, 1040-NR, 1098, 1098-E, 1098-T, 1095A, 1095C, W-4, UnifiedTaxUS. 202 + Location poll; saves process_tax_document.json.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_nameNo
profilesNo
tax_modelNo
output_dirNo
pdf_file_pathNo
custom_field_keysNo
custom_field_keys_csvNo
Behavior5/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 so excellently. It reveals exact docName handling (trimmed, default fallback, never replaced by local basename), isAsync=true, taxModel omission rules, customFieldKeys camelCase merging, profiles sanitization, polling behavior on 202 + Location, and the output file name.

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 and packed with essential operational details in a single paragraph. It is front-loaded with purpose and then flows through request body, parameters, and output. While a bit run-on, every clause adds value and no filler is present.

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?

Given the tool's complexity (7 params, no output schema, no annotations), the description provides a remarkably complete picture: request construction, parameter semantics, file input requirements, polling behavior, and output artifact. The only minor omission is explicit output_dir semantics, but overall it is fully sufficient for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must document parameters itself. It thoroughly explains doc_name, tax_model with examples, custom_field_keys/CSV merging, profiles, and pdf_file_path formats. However, output_dir is not explicitly described, and 'profiles (sanitized)' is vague.

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 a specific action ('extract structured tax data') and resource (PDF4me POST /api/v2/ProcessTaxDocument), and is unambiguous about its tax-document scope. This distinguishes it from sibling tools like process_invoice or process_contract.

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?

The description makes clear this is for tax documents by naming tax_model examples and describing the extraction workflow. However, it does not explicitly mention when not to use it or point to alternative tools for other document types.

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