AgentPMT
File To JSON Parsing

File To JSON Parsing

Core Utility

Available ActionsEach successful request consumes credits as outlined below.

extract-csv5crextract-html5crextract-json5crextract-ics5crextract-ods5crextract-pdf5crextract-rtf5crextract-text5crextract-xls5crextract-xlsx5crfile-to-base645cr

Details

A powerful data extraction tool that converts a wide variety of binary file formats into structured JSON output for seamless processing in automated workflows. This function supports eleven extraction actions covering the most common document and data formats: CSV for tabular data parsing, HTML for extracting text content and table structures using BeautifulSoup, JSON for direct parsing, ICS for calendar event extraction, ODS and XLSX/XLS for spreadsheet processing across LibreOffice and Microsoft Excel formats, PDF for page-by-page text and table extraction using pdfplumber, RTF for rich text conversion, and plain text for basic content retrieval. Users can provide input via base64-encoded content or cloud storage file ID, with support for files up to 100MB and inline base64 returns up to 10MB. Configurable parameters allow fine-tuning of extraction behavior including maximum row limits up to 100,000 for spreadsheets, maximum page counts up to 1,000 for PDFs, and toggles for text and table inclusion in applicable formats. The function automatically handles character encoding detection and returns consistently structured JSON with customizable output field names, making it an essential bridge between raw file uploads and downstream data processing pipelines.

Use Cases

Parsing uploaded CSV files into structured records for database import or API submission, extracting tabular data from HTML reports or web page snapshots for analysis, converting calendar ICS files into event objects for scheduling integrations, processing Excel spreadsheets from user uploads into JSON for data transformation pipelines, extracting text and tables from PDF invoices or contracts for automated document processing, converting legacy XLS files from enterprise systems into modern JSON formats, parsing RTF documents from email attachments into plaintext for content indexing, scraping structured table data from HTML exports for reporting dashboards, extracting event details from shared calendar files for synchronization workflows, converting uploaded spreadsheet data into API-compatible payloads for third-party service integrations

Actions(11)

extract-csv5cr4 params

Parse a CSV file into structured row data.

Parse a CSV file into structured row data.

input_base64string

Base64-encoded file content.

file_idstring

File ID from cloud storage.

output_fieldstring

Key name for the extracted data in the response.

Default: data
max_rowsinteger

Maximum rows to extract.

Default: 1000
Range: 1 - 100000
extract-html5cr6 params

Parse an HTML file, extracting text content and/or table data.

Parse an HTML file, extracting text content and/or table data.

input_base64string

Base64-encoded file content.

file_idstring

File ID from cloud storage.

output_fieldstring

Key name for the extracted data in the response.

Default: data
include_textboolean

Include extracted text content.

Default: true
include_tablesboolean

Include extracted table data.

Default: true
max_rowsinteger

Maximum rows per table.

Default: 1000
Range: 1 - 100000
extract-json5cr3 params

Parse a JSON file and return its contents as structured data.

Parse a JSON file and return its contents as structured data.

input_base64string

Base64-encoded file content.

file_idstring

File ID from cloud storage.

output_fieldstring

Key name for the extracted data in the response.

Default: data
extract-ics5cr3 params

Parse an ICS calendar file and extract events with summary, start, end, location, and description.

Parse an ICS calendar file and extract events with summary, start, end, location, and description.

input_base64string

Base64-encoded file content.

file_idstring

File ID from cloud storage.

output_fieldstring

Key name for the extracted data in the response.

Default: data
extract-ods5cr4 params

Parse an OpenDocument Spreadsheet (.ods) file, returning sheets with row data.

Parse an OpenDocument Spreadsheet (.ods) file, returning sheets with row data.

input_base64string

Base64-encoded file content.

file_idstring

File ID from cloud storage.

output_fieldstring

Key name for the extracted data in the response.

Default: data
max_rowsinteger

Maximum rows per sheet.

Default: 1000
Range: 1 - 100000
extract-pdf5cr6 params

Extract text and/or tables from a PDF document, page by page.

Extract text and/or tables from a PDF document, page by page.

input_base64string

Base64-encoded file content.

file_idstring

File ID from cloud storage.

output_fieldstring

Key name for the extracted data in the response.

Default: data
include_textboolean

Include text extraction per page.

Default: true
include_tablesboolean

Include table extraction per page.

Default: true
max_pagesinteger

Maximum pages to process.

Default: 50
Range: 1 - 1000
extract-rtf5cr3 params

Parse an RTF (Rich Text Format) file and extract plain text.

Parse an RTF (Rich Text Format) file and extract plain text.

input_base64string

Base64-encoded file content.

file_idstring

File ID from cloud storage.

output_fieldstring

Key name for the extracted data in the response.

Default: data
extract-text5cr3 params

Read a plain text file and return its contents.

Read a plain text file and return its contents.

input_base64string

Base64-encoded file content.

file_idstring

File ID from cloud storage.

output_fieldstring

Key name for the extracted data in the response.

Default: data
extract-xls5cr4 params

Parse a legacy Excel (.xls) file, returning sheets with row data.

Parse a legacy Excel (.xls) file, returning sheets with row data.

input_base64string

Base64-encoded file content.

file_idstring

File ID from cloud storage.

output_fieldstring

Key name for the extracted data in the response.

Default: data
max_rowsinteger

Maximum rows per sheet.

Default: 1000
Range: 1 - 100000
extract-xlsx5cr4 params

Parse a modern Excel (.xlsx) file, returning sheets with row data.

Parse a modern Excel (.xlsx) file, returning sheets with row data.

input_base64string

Base64-encoded file content.

file_idstring

File ID from cloud storage.

output_fieldstring

Key name for the extracted data in the response.

Default: data
max_rowsinteger

Maximum rows per sheet.

Default: 1000
Range: 1 - 100000
file-to-base645cr2 params

Convert a file to base64-encoded string. File must be 10 MB or smaller for inline return.

Convert a file to base64-encoded string. File must be 10 MB or smaller for inline return.

input_base64string

Base64-encoded file content.

file_idstring

File ID from cloud storage.

Frequently Asked Questions

How do I connect this tool to an external agent?

Install commands

npm install -g @agentpmt/mcp-router
agentpmt-setup

Hosted MCP config

{
  "mcpServers": {
    "agentpmt": {
      "type": "streamable-http",
      "url": "https://api.agentpmt.com/mcp",
      "headers": {
        "Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
        "x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
      }
    }
  }
}

How does an external agent use this tool?

Agent prompt

Call the AgentPMT-Tool-Search-and-Execution tool with action 'get_schema' and tool_id 695c3797767df5adfd9bc872 ("File To JSON Parsing"). Then call the same tool with action 'call_tool', tool_id 695c3797767df5adfd9bc872, and the parameters needed for my request.

Dependencies

1 dependencies will be automatically added when you enable this product.

Workflows Using This Tool

Workflow
Saves ~45 min
File To JSON Parsing
Multi-Location Route Optimizer W Map
Get Users Current Time / Date
Date and Time Calculator
Web Data Convertor
+1 more tool
Takes a CSV or spreadsheet file with addresses, asks for a starting drive time, time per stop, and starting address, then parses the addresses, optimizes the driving route, calculates estimated arrival and departure times for each location, and generates a CSV with the full schedule. Returns the optimized route map, Google Maps directions link, and the schedule CSV both locally and via notification. Ideal for field sales, service technicians, delivery planning, or any multi-stop appointment scheduling.

Looking for help integrating AI into your business? Set up a free consultation.