AgentPMT
File Utilities and Editing

File Utilities and Editing

Core Utility

Available ActionsEach successful request consumes credits as outlined below.

file-mime-type-detect5crfile-extension-from-mime5crfile-size-format5crfile-path-parse5crfile-path-join5crfile-path-normalize5crfile-csv-to-table5crfile-json-pretty-print5crfile-json-minify5crfile-base64-encode5crfile-base64-decode5crfile-hash-generate5cr

Details

A utility for file metadata operations, path manipulation, and content formatting commonly needed when working with files in automation workflows and application development. MIME type detection identifies the content type of files based on filename extensions, covering documents, images, audio, video, archives, and programming languages, while reverse lookup finds appropriate file extensions for a given MIME type. File size formatting converts byte counts into human-readable strings with automatic unit scaling from bytes through petabytes. Path manipulation functions parse file paths into components including directory, filename, name, and extension, join multiple path segments with proper separators, and normalize paths by resolving relative references and redundant separators. CSV to table conversion parses comma-separated data and formats it as an ASCII table with aligned columns for display purposes, also returning structured header and row data. JSON formatting includes pretty printing with configurable indentation for readability and minification that removes all unnecessary whitespace with size reduction statistics. Base64 encoding and decoding handles text-to-base64 conversion for data embedding and transmission. Cryptographic hash generation supports MD5, SHA-1, SHA-256, and SHA-512 algorithms for content integrity verification and fingerprinting.

Use Cases

MIME type detection, file type identification, content type lookup, extension to MIME, MIME to extension, file extension lookup, file size formatting, byte size conversion, human readable file size, KB MB GB formatting, storage size display, file path parsing, path component extraction, directory extraction, filename extraction, extension extraction, path joining, path concatenation, cross-platform path, path normalization, relative path resolution, absolute path conversion, path cleanup, CSV formatting, CSV to table, tabular data display, ASCII table generation, CSV visualization, JSON pretty print, JSON formatting, JSON indentation, readable JSON, JSON beautify, JSON minify, JSON compression, JSON whitespace removal, minified JSON, JSON size reduction, base64 encode, text to base64, base64 encoding, base64 decode, base64 to text, base64 decoding, MD5 hash, SHA1 hash, SHA256 hash, SHA512 hash, content hash, file fingerprint, integrity check, checksum generation, hash generation, file metadata, file utilities, automation file operations, AI agent file handling, LLM file processing, workflow file tools

Actions(12)

file-mime-type-detect5cr1 param(1 required)

Detect the MIME type of a file based on its filename/extension. Supports documents, images, audio, video, archives, and programming languages.

Detect the MIME type of a file based on its filename/extension. Supports documents, images, audio, video, archives, and programming languages.

inputrequiredstring

The filename to analyze (e.g., 'report.pdf', 'photo.jpg')

file-extension-from-mime5cr1 param(1 required)

Look up the standard file extension for a given MIME type.

Look up the standard file extension for a given MIME type.

inputrequiredstring

A MIME type string (e.g., 'image/png', 'application/pdf')

file-size-format5cr1 param(1 required)

Convert a raw byte count into a human-readable size string (KB, MB, GB, etc.).

Convert a raw byte count into a human-readable size string (KB, MB, GB, etc.).

inputrequiredstring

File size in bytes as a string (e.g., '5242880')

file-path-parse5cr1 param(1 required)

Break a file path into its component parts: directory, filename, name, and extension.

Break a file path into its component parts: directory, filename, name, and extension.

inputrequiredstring

A file path to parse (e.g., '/home/user/documents/report.pdf')

file-path-join5cr3 params(1 required)

Join multiple path components into a single path. Provide components as a comma-separated string in input, or use input, input2, and input3 fields for up to three components. At least 2 components required.

Join multiple path components into a single path. Provide components as a comma-separated string in input, or use input, input2, and input3 fields for up to three components. At least 2 components required.

inputrequiredstring

First path component, or a comma-separated list of all components

input2string

Second path component (when not using comma separation)

input3string

Third path component (when not using comma separation)

file-path-normalize5cr1 param(1 required)

Clean up a file path by resolving '..', '.', and redundant separators.

Clean up a file path by resolving '..', '.', and redundant separators.

inputrequiredstring

A file path to normalize (e.g., '/home/user/../user/./documents//file.txt')

file-csv-to-table5cr1 param(1 required)

Parse CSV content and render it as a formatted ASCII table. The first row is treated as headers.

Parse CSV content and render it as a formatted ASCII table. The first row is treated as headers.

inputrequiredstring

CSV content as a string (e.g., 'Name,Age,City\nAlice,30,New York')

file-json-pretty-print5cr2 params(1 required)

Format a compact JSON string with indentation for readability.

Format a compact JSON string with indentation for readability.

inputrequiredstring

A valid JSON string to format

indentinteger

Number of spaces per indentation level (0-8)

Default: 2
Range: 0 - 8
file-json-minify5cr1 param(1 required)

Remove all unnecessary whitespace from a JSON string to produce the most compact representation.

Remove all unnecessary whitespace from a JSON string to produce the most compact representation.

inputrequiredstring

A valid JSON string to minify

file-base64-encode5cr1 param(1 required)

Encode a text string to base64 using UTF-8 encoding.

Encode a text string to base64 using UTF-8 encoding.

inputrequiredstring

The text to encode to base64

file-base64-decode5cr1 param(1 required)

Decode a base64 string back to UTF-8 text.

Decode a base64 string back to UTF-8 text.

inputrequiredstring

A valid base64-encoded string to decode

file-hash-generate5cr2 params(1 required)

Generate a cryptographic hash of the provided text content.

Generate a cryptographic hash of the provided text content.

inputrequiredstring

The content to hash

hash_algorithmstring

Hash algorithm to use: md5, sha1, sha256, or sha512

Values:
md5sha1sha256sha512
Default: sha256

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 694ed536cca5b5123ad00c33 ("File Utilities and Editing"). Then call the same tool with action 'call_tool', tool_id 694ed536cca5b5123ad00c33, and the parameters needed for my request.

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

File Utilities and Editing by Apoth3osis | AgentPMT