@tokenzero/mcp 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/tokenzero-mcp.mjs +11 -1
- package/package.json +1 -1
package/bin/tokenzero-mcp.mjs
CHANGED
|
@@ -754,7 +754,7 @@ function manifests(root) {
|
|
|
754
754
|
}
|
|
755
755
|
|
|
756
756
|
// mcp/src/main.ts
|
|
757
|
-
var VERSION = "0.2.
|
|
757
|
+
var VERSION = "0.2.7";
|
|
758
758
|
var BAKED_URL = true ? "https://tokenzero.sh" : "__TOKENZERO_DEFAULT_URL__";
|
|
759
759
|
var SUPPORTED = [...MCP_LEGACY_VERSIONS];
|
|
760
760
|
var SERVER = { name: "tokenzero", version: VERSION };
|
|
@@ -764,26 +764,36 @@ var serviceUrl = () => (process.env.TOKENZERO_URL || (BAKED_URL.startsWith("http
|
|
|
764
764
|
var TOOLS = [
|
|
765
765
|
{
|
|
766
766
|
name: "audit_repo_token_waste",
|
|
767
|
+
title: "Audit a repo or directory for LLM token waste",
|
|
768
|
+
annotations: { title: "Audit a repo or directory for LLM token waste", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
767
769
|
description: "Static audit for LLM token waste: uncached static prompts and prompt templates, frontier models on extraction/classification prompts, calls in loops, unpriced models. Give `path` for a local directory (scanned on this machine, nothing uploaded; defaults to the working directory), `repo` (owner/name) for a public GitHub repo, or `diff` for a unified diff. Results are static heuristics, not measurements.",
|
|
768
770
|
inputSchema: { type: "object", properties: { path: { type: "string", description: "local directory; defaults to the current working directory" }, repo: { type: "string", description: "public GitHub owner/name" }, diff: { type: "string", description: "unified diff text, e.g. from git diff" } }, additionalProperties: false }
|
|
769
771
|
},
|
|
770
772
|
{
|
|
771
773
|
name: "calculate_model_arbitrage",
|
|
774
|
+
title: "Price a workload across models",
|
|
775
|
+
annotations: { title: "Price a workload across models", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
772
776
|
description: `Price a workload at list prices (table ${PRICING_VERSION}) for the requested model, its cheaper sibling and any extra models, with and without prompt caching. Runs locally.`,
|
|
773
777
|
inputSchema: { type: "object", properties: { model: { type: "string" }, input_tokens: { type: "number" }, output_tokens: { type: "number" }, requests_per_month: { type: "number" }, static_tokens: { type: "number", description: "portion of input_tokens that is a fixed prefix (system + tools)" }, compare_to: { type: "array", items: { type: "string" } } }, required: ["model", "input_tokens", "output_tokens"], additionalProperties: false }
|
|
774
778
|
},
|
|
775
779
|
{
|
|
776
780
|
name: "optimize_prompt_payload",
|
|
781
|
+
title: "Make a request body cache-friendly",
|
|
782
|
+
annotations: { title: "Make a request body cache-friendly", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
777
783
|
description: "Rewrite an OpenAI Chat/Responses or Anthropic Messages request body so its static prefix is provider-cacheable, and project the saving. Sends the body you pass to the TokenZero service (set TOKENZERO_URL); do not pass secrets in it.",
|
|
778
784
|
inputSchema: { type: "object", properties: { body: { type: "object" }, endpoint: { type: "string", enum: ["/v1/chat/completions", "/v1/responses", "/v1/messages"] }, strategy: { type: "string", enum: ["static", "conversation"] } }, required: ["body"], additionalProperties: false }
|
|
779
785
|
},
|
|
780
786
|
{
|
|
781
787
|
name: "workspace_metrics",
|
|
788
|
+
title: "Read a workspace savings scorecard",
|
|
789
|
+
annotations: { title: "Read a workspace savings scorecard", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
782
790
|
description: "Live value scorecard for a TokenZero workspace (GET /v1/workspaces/me/metrics): hard savings and net ROI per window, per-engine contribution, speed, parity, availability, privacy posture, per-model breakdown and one-click recommendations. Uses TOKENZERO_KEY unless a key is given; demo: true returns a labelled sample.",
|
|
783
791
|
inputSchema: { type: "object", properties: { key: { type: "string", description: "workspace key (tz_live_\u2026); defaults to TOKENZERO_KEY" }, window: { type: "string", enum: ["24h", "7d", "30d", "all"] }, demo: { type: "boolean" } } }
|
|
784
792
|
},
|
|
785
793
|
{
|
|
786
794
|
name: "provision_workspace",
|
|
795
|
+
title: "Create a free TokenZero workspace",
|
|
796
|
+
annotations: { title: "Create a free TokenZero workspace", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
787
797
|
description: "Create a TokenZero workspace and key with no form (POST /v1/workspaces on the TokenZero service). Returns the key once, the base URLs that route through it, the one-click dashboard link (key in the URL fragment, never sent to the server) and the badge URL. Free up to the monthly free tier; nothing is billed.",
|
|
788
798
|
inputSchema: { type: "object", properties: { name: { type: "string", description: 'workspace name (defaults to "mcp-agent")' } }, additionalProperties: false }
|
|
789
799
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenzero/mcp",
|
|
3
3
|
"mcpName": "sh.tokenzero/mcp",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.7",
|
|
5
5
|
"description": "TokenZero MCP server (stdio): audit LLM token waste in your project locally, price model alternatives, and make prompts cache-friendly from Claude Code, Cursor, Windsurf or Cline.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "Apache-2.0",
|