MCP Server

Nanotoll MCP

dev.nanotoll/nanotoll-mcp
Developer Tools Public & reachable MCP 2025-11-25

What this MCP does

Converts and edits text formats, generates diffs and patches, prunes text, estimates LLM costs, and creates or validates llms.txt files.

convert
Transform text between JSON, YAML, TOML, and CSV formats. Returns the converted text and input/output character metrics. Note some conversions can be lossy (e.g. JSON to CSV flattens nested structures). Requires a valid API key (Bearer token); billing is per input character — insufficient balance returns HTTP 402. For removing comments use `prune`, for generating llms.txt use `generate`.
Read only Idempotent
Input schema
{'type': 'object', 'required': ['payload', 'from_format', 'to_format'], 'properties': {'payload': {'type': 'string', 'description': 'Text to convert (1 char min, 10 MiB max).'}, 'to_format': {'enum': ['json', 'yaml', 'toml', 'csv'], 'type': 'string', 'description': 'Target format to convert into.'}, 'from_format': {'enum': ['json', 'yaml', 'toml', 'csv'], 'type': 'string', 'description': 'Source format of the input payload.'}}}
diff
Generate a unified diff between two text versions (the before and after). Returns the diff text plus metrics (lines added, lines removed, output chars). Requires a valid API key (Bearer token); billing is per combined input characters. To apply a diff, use `patch`.
Read only Idempotent
Input schema
{'type': 'object', 'required': ['text_a', 'text_b'], 'properties': {'text_a': {'type': 'string', 'description': 'First text version (the "before" text).'}, 'text_b': {'type': 'string', 'description': 'Second text version (the "after" text).'}}}
estimate
Estimate the USD cost of an LLM API call using the CWEP four-flow model (request generation, request processing, response generation, response reception). Returns a JSON object with the per-flow cost breakdown, the total, and the pricing source date. Unknown model names return HTTP 422 — check GET /api/v1/pricing on costa.nanotoll.dev for the supported list (no auth needed). Requires a valid API key (Bearer token); billing is per input character.
Read only Idempotent
Input schema
{'type': 'object', 'required': ['model', 'input_tokens', 'output_tokens'], 'properties': {'model': {'type': 'string', 'description': 'Model name (e.g. gpt-4o).'}, 'input_tokens': {'type': 'integer', 'minimum': 0, 'description': 'Number of input (prompt) tokens.'}, 'output_tokens': {'type': 'integer', 'minimum': 0, 'description': 'Number of output (completion) tokens.'}}}
generate
Generate an llms.txt agent-discovery file from structured service metadata (name, endpoints, overview, links, pricing). Returns the llms.txt content and output metrics. Requires a valid API key (Bearer token); billing is per input character. To check an existing llms.txt for spec compliance, use `validate`.
Read only Idempotent
Input schema
{'type': 'object', 'required': ['name', 'endpoints'], 'properties': {'name': {'type': 'string', 'description': 'Service name (H1 title of the llms.txt file).'}, 'links': {'type': 'array', 'items': {'type': 'object', 'required': ['title', 'url'], 'properties': {'url': {'type': 'string', 'format': 'uri', 'description': 'Target URL.'}, 'title': {'type': 'string', 'description': 'Display text for the link.'}}}, 'description': 'Optional related links (docs, source, etc.). Each item has title and url.'}, 'pricing': {'type': ['string', 'null'], 'description': 'Pricing summary string (e.g. "$0.0002 per call"). Pass null to omit.'}, 'tagline': {'type': ['string', 'null'], 'description': 'One-line summary of the service, shown as a subtitle below the H1. Pass null to omit.'}, 'overview': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Paragraphs of prose describing the service. Each array element becomes a paragraph in the llms.txt Overview section.'}, 'endpoints': {'type': 'array', 'items': {'type': 'object', 'required': ['method', 'path', 'description'], 'properties': {'path': {'type': 'string', 'description': 'Endpoint path (e.g. /api/v1/squeeze).'}, 'method': {'type': 'string', 'description': 'HTTP method (GET, POST, etc.).'}, 'description': {'type': 'string', 'description': 'What the endpoint does.'}}}, 'description': 'API endpoints to list in the llms.txt. Each item has method, path, and description.'}}}
patch
Apply a unified diff patch to text, producing the transformed output. Returns the patched text. Requires a valid API key (Bearer token); billing is per combined input characters. To generate a diff, use `diff`.
Input schema
{'type': 'object', 'required': ['text', 'patch'], 'properties': {'text': {'type': 'string', 'description': 'Original text to apply the patch to.'}, 'patch': {'type': 'string', 'description': 'Unified diff patch text.'}}}
prune
Strip comments and empty lines from text to reduce token count before sending to an LLM. Returns the pruned text and character metrics. Requires a valid API key (Bearer token); billing is per input character — insufficient balance returns HTTP 402. For format conversion use `convert`, for generating llms.txt use `generate`.
Read only Idempotent
Input schema
{'type': 'object', 'required': ['payload'], 'properties': {'payload': {'type': 'string', 'description': 'Text to prune (1 char min, 10 MiB max).'}, 'comment_prefix': {'type': 'string', 'description': "Optional. Explicit comment-line prefix to strip outside code fences (e.g. '//' for C-style code). Omit for format-aware pruning: markdown '#' headings are preserved (v101 #12 note), no line stripping on plain text. Max 64 bytes, no control chars."}, 'remove_empty_lines': {'type': 'boolean', 'default': True, 'description': 'If true, empty lines outside code fences are removed.'}}}
read
Fetch a web page and return clean GitHub-flavored markdown at a strict token budget. DOM-density scoring strips boilerplate (CSS, JS, navbars, tracking) — raw HTML averages 80-95% noise. Requires a valid API key (Bearer token); billing is $0.0005 flat per read — insufficient balance returns HTTP 402. Fetch failures return HTTP 422 and are refunded.
Read only Open world Idempotent
Input schema
{'type': 'object', 'required': ['url'], 'properties': {'url': {'type': 'string', 'format': 'uri', 'description': 'URL of the web page to fetch and convert to markdown.'}, 'max_tokens': {'type': 'integer', 'minimum': 1, 'description': 'Optional token budget â\x80\x94 markdown is truncated to this many estimated tokens. Omit for full page.'}, 'include_links': {'type': 'boolean', 'default': True, 'description': 'If true, hyperlinks are kept as markdown links.'}, 'preserve_tables': {'type': 'boolean', 'default': True, 'description': 'If true, HTML tables are preserved as GFM tables.'}}}
validate
Validate an llms.txt payload for spec compliance (H1 title, endpoints section, pricing section, structure). Returns a validation report with errors, warnings, and structural flags. Requires a valid API key (Bearer token); billing is per input character. To generate new llms.txt, use `generate`.
Read only Idempotent
Input schema
{'type': 'object', 'required': ['content'], 'properties': {'content': {'type': 'string', 'description': 'llms.txt content to validate.'}}}
Added
read
Sept. 17, 2026, 12:39 p.m.
Added
validate
Sept. 17, 2026, 12:39 p.m.
Added
generate
Sept. 17, 2026, 12:39 p.m.
Added
patch
Sept. 17, 2026, 12:39 p.m.
Added
diff
Sept. 17, 2026, 12:39 p.m.
Added
estimate
Sept. 17, 2026, 12:39 p.m.
Added
convert
Sept. 17, 2026, 12:39 p.m.
Added
prune
Sept. 17, 2026, 12:39 p.m.