API & MCP
Everything a person can do on Sharecrate Safe File Names, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://sharecratesafefilenames.usefulweb.app/api/v1/calculate– run Sharecrate Safe File NamesGET https://sharecratesafefilenames.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Sharecrate Safe File Names
Paste file names, one per line, and get names that work everywhere: no characters Windows refuses, no reserved device names like CON or NUL, no hidden text-direction characters that disguise an extension, Unicode in the composed form (NFC), no trailing dots or spaces and at most 200 bytes with the extension kept. Names that become equal are numbered the way Sharecrate does it, and program extensions are flagged.
| Field | Type | Default | Description |
|---|---|---|---|
names | textarea | "Quarterly report: final?.pdf\nCON.txt\nnotes .\n../../etc/passwd\nInvoicefdp.e | File names (one per line). Paths are cut to their last part. At most 2000 names. |
dedupe | boolean | true | Number names that become equal (photo (2).jpg) |
Example request
Messy names from several systems
curl -X POST https://sharecratesafefilenames.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"names":"Quarterly report: final?.pdf\nCON.txt\nnotes .\n../../etc/passwd\nInvoicefdp.exe\nRésumé.docx\nRésumé.docx\nphoto<1>.jpg\n spaced out name.png\n.hidden-config","dedupe":true}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://sharecratesafefilenames.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
sharecrate_safe_filenames - Local stdio connector:
node src/mcp-stdio.ts --tool=sharecrate-safe-filenames
{
"mcpServers": {
"sharecrate-safe-filenames": { "type": "http", "url": "https://sharecratesafefilenames.usefulweb.app/mcp" }
}
}