Files2.AI

v0.1.1
io.github.mattkir/files2ai Checked 1 day ago Published 2 days ago

Convert documents into Markdown and text locally or through the hosted PDF and Office API.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

convert_file Convert a file to LLM-ready text

Convert a local file to clean, LLM-ready text with optional PII redaction and context-window chunking. Text formats (txt, csv/tsv, json, md, html, log) convert entirely on this machine via @files2ai/convert-core. Hosted conversion is used only when FILES2AI_API_KEY is set and the extension is in the stable hosted allowlist (no-retention contract: x-files2ai-retention: none). Max 50 MB local, 3 MB hosted.

ParameterTypeDescription
path *stringPath to the file to convert (absolute preferred)
chunk_overlapintegerApproximate token overlap carried between consecutive chunks (default 0)
chunk_tokensintegerSplit output into parts of roughly this many estimated tokens (min 128)
formatstringOutput format: md (default), txt, json, jsonl, or xml
redactbooleanRedact PII (emails, phones, SSNs, API keys, secrets, IPs, ...) before output. Runs locally.

convert_text Convert raw text to LLM-ready output

Convert pasted text (CSV, JSON, HTML, Markdown, plain text) to clean, LLM-ready output with optional PII redaction and chunking. Always runs locally; nothing leaves this machine. Use filename_hint (e.g. "data.csv") to pick the parser.

ParameterTypeDescription
text *stringThe raw text to convert
chunk_overlapintegerApproximate token overlap carried between consecutive chunks (default 0)
chunk_tokensintegerSplit output into parts of roughly this many estimated tokens (min 128)
filename_hintstringFilename or extension hint driving parser selection, e.g. "report.csv" or "page.html" (default: input.txt)
formatstringOutput format: md (default), txt, json, jsonl, or xml
redactbooleanRedact PII (emails, phones, SSNs, API keys, secrets, IPs, ...) before output. Runs locally.

list_supported_formats List supported formats

Describe which file formats convert locally (on-device), which the hosted Files2.AI API accepts (requires FILES2AI_API_KEY), and which are app-only today.