Nanotoll MCP
7 agent tools (prune, convert, estimate, diff, patch, generate, validate). USDC on Base L2.
我该使用它吗
质量与安全性
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"nanotoll-mcp": {
"url": "https://mcp.nanotoll.dev/mcp"
}
}
}远程端点
https://mcp.nanotoll.dev/mcpstreamable-http它能做什么
工具清单
工具(8)
🟢prune(comment_prefix, payload, remove_empty_lines)
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`.
输入模式
{
"type": "object",
"properties": {
"comment_prefix": {
"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.",
"type": "string"
},
"payload": {
"description": "Text to prune (1 char min, 10 MiB max).",
"type": "string"
},
"remove_empty_lines": {
"default": true,
"description": "If true, empty lines outside code fences are removed.",
"type": "boolean"
}
},
"required": [
"payload"
]
}🟢convert(from_format, payload, to_format)
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`.
输入模式
{
"type": "object",
"properties": {
"from_format": {
"description": "Source format of the input payload.",
"enum": [
"json",
"yaml",
"toml",
"csv"
],
"type": "string"
},
"payload": {
"description": "Text to convert (1 char min, 10 MiB max).",
"type": "string"
},
"to_format": {
"description": "Target format to convert into.",
"enum": [
"json",
"yaml",
"toml",
"csv"
],
"type": "string"
}
},
"required": [
"payload",
"from_format",
"to_format"
]
}🟢estimate(input_tokens, model, output_tokens)
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.
输入模式
{
"type": "object",
"properties": {
"input_tokens": {
"description": "Number of input (prompt) tokens.",
"minimum": 0,
"type": "integer"
},
"model": {
"description": "Model name (e.g. gpt-4o).",
"type": "string"
},
"output_tokens": {
"description": "Number of output (completion) tokens.",
"minimum": 0,
"type": "integer"
}
},
"required": [
"model",
"input_tokens",
"output_tokens"
]
}🟢diff(text_a, text_b)
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`.
输入模式
{
"type": "object",
"properties": {
"text_a": {
"description": "First text version (the \"before\" text).",
"type": "string"
},
"text_b": {
"description": "Second text version (the \"after\" text).",
"type": "string"
}
},
"required": [
"text_a",
"text_b"
]
}🟡patch(patch, text)
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`.
输入模式
{
"type": "object",
"properties": {
"patch": {
"description": "Unified diff patch text.",
"type": "string"
},
"text": {
"description": "Original text to apply the patch to.",
"type": "string"
}
},
"required": [
"text",
"patch"
]
}🟢generate(endpoints, links, name, overview, pricing, ...)
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`.
输入模式
{
"type": "object",
"properties": {
"endpoints": {
"description": "API endpoints to list in the llms.txt. Each item has method, path, and description.",
"items": {
"properties": {
"description": {
"description": "What the endpoint does.",
"type": "string"
},
"method": {
"description": "HTTP method (GET, POST, etc.).",
"type": "string"
},
"path": {
"description": "Endpoint path (e.g. /api/v1/squeeze).",
"type": "string"
}
},
"required": [
"method",
"path",
"description"
],
"type": "object"
},
"type": "array"
},
"links": {
"description": "Optional related links (docs, source, etc.). Each item has title and url.",
"items": {
"properties": {
"title": {
"description": "Display text for the link.",
"type": "string"
},
"url": {
"description": "Target URL.",
"format": "uri",
"type": "string"
}
},
"required": [
"title",
"url"
],
"type": "object"
},
"type": "array"
},
"name": {
"description": "Service name (H1 title of the llms.txt file).",
"type": "string"
},
"overview": {
"description": "Paragraphs of prose describing the service. Each array element becomes a paragraph in the llms.txt Overview section.",
"items": {
"type": "string"
},
"type": "array"
},
"pricing": {
"description": "Pricing summary string (e.g. \"$0.0002 per call\"). Pass null to omit.",
"type": [
"string",
"null"
]
},
"tagline": {
"description": "One-line summary of the service, shown as a subtitle below the H1. Pass null to omit.",
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"endpoints"
]
}🟢validate(content)
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`.
输入模式
{
"type": "object",
"properties": {
"content": {
"description": "llms.txt content to validate.",
"type": "string"
}
},
"required": [
"content"
]
}🟢read(include_links, max_tokens, preserve_tables, url)
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.
输入模式
{
"type": "object",
"properties": {
"include_links": {
"default": true,
"description": "If true, hyperlinks are kept as markdown links.",
"type": "boolean"
},
"max_tokens": {
"description": "Optional token budget — markdown is truncated to this many estimated tokens. Omit for full page.",
"minimum": 1,
"type": "integer"
},
"preserve_tables": {
"default": true,
"description": "If true, HTML tables are preserved as GFM tables.",
"type": "boolean"
},
"url": {
"description": "URL of the web page to fetch and convert to markdown.",
"format": "uri",
"type": "string"
}
},
"required": [
"url"
]
}社区
证据