@slickfast/mcp 0.7.7 → 0.7.8
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/README.md +5 -3
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -77,8 +77,9 @@ Rendering is always **local** — nothing leaves your machine. This section is p
|
|
|
77
77
|
surface *displays* the result. `render_chart` returns two ways, and they differ a lot:
|
|
78
78
|
|
|
79
79
|
- **`format:"svg"` → the reliable inline path.** Returns SVG *text*. In a chat surface that supports
|
|
80
|
-
**artifacts** (claude.ai, Claude Desktop), the agent
|
|
81
|
-
it
|
|
80
|
+
**artifacts** (claude.ai, Claude Desktop), the agent **creates an artifact containing that SVG**
|
|
81
|
+
and presents it — that's the display step; the SVG string in the tool result is not user-visible
|
|
82
|
+
on its own. Ask for a chart and Claude does this — no config, no gymnastics.
|
|
82
83
|
- **`format:"png"` (default) → a base64 image block.** It only paints where the client renders MCP
|
|
83
84
|
image blocks, which is **inconsistent across surfaces** — many chat UIs, and every coding/terminal
|
|
84
85
|
view, don't. Don't depend on it for inline display.
|
|
@@ -101,7 +102,8 @@ Rendering is fully local and needs no network. Separately, SlickFast runs a **ho
|
|
|
101
102
|
that turns a spec into a public `…/chart.png?spec=<url-encoded spec>` link — useful for
|
|
102
103
|
embedding, posting to Slack/X/email, or getting a chart into a surface that can't display a
|
|
103
104
|
local image (see the table above). The agent should **offer this only when you ask to share
|
|
104
|
-
or post** — it never auto-inserts links.
|
|
105
|
+
or post** — it never auto-inserts links. Get an API key (free tier, no card) at
|
|
106
|
+
[slickfast.com](https://slickfast.com).
|
|
105
107
|
|
|
106
108
|
## License
|
|
107
109
|
|
package/dist/index.js
CHANGED
|
@@ -3141,7 +3141,7 @@ var inputSchema = {
|
|
|
3141
3141
|
deltaUnit: z.string().optional().describe('kpi: delta unit, default "%"'),
|
|
3142
3142
|
deltaGoodWhen: z.enum(["up", "down"]).optional().describe('kpi: which delta direction is GOOD (green). Default "up"; set "down" for lower-is-better metrics (churn, latency, cost)'),
|
|
3143
3143
|
sparkline: z.array(z.number()).optional().describe("kpi: a minimalist trend line along the bottom of the tile (e.g. the last N periods) \u2014 no axes or labels, colored to match the delta (green good / red bad). Landscape tile only; omit it and the tile is unchanged."),
|
|
3144
|
-
format: z.enum(["png", "svg"]).optional().describe('output format. "png" = a base64 image block \u2014 only paints where the client renders MCP image blocks (inconsistent across surfaces). "svg" = scalable vector TEXT. TO SHOW A CHART INLINE in a chat surface that supports artifacts (claude.ai, Claude Desktop): request "svg" and
|
|
3144
|
+
format: z.enum(["png", "svg"]).optional().describe('output format. "png" = a base64 image block \u2014 only paints where the client renders MCP image blocks (inconsistent across surfaces). "svg" = scalable vector TEXT. TO SHOW A CHART INLINE in a chat surface that supports artifacts (claude.ai, Claude Desktop): request "svg", then CREATE an artifact/widget containing that SVG and present it. The SVG string in this tool result is NOT visible to the user on its own \u2014 returning it is not displaying it; you must place it into an artifact. Do NOT rely on the default png image block painting inline.'),
|
|
3145
3145
|
scale: z.number().optional().describe("png pixel-density multiplier (default 2 = retina)"),
|
|
3146
3146
|
outputPath: z.string().optional().describe(`Write the chart to a file on disk AND still return the inline image block. PNG by default, or SVG if the path ends in ".svg". Absolute, ~, or relative paths (parent dirs auto-created). IMPORTANT: it writes to the MCP process's OWN filesystem. Only useful on a LOCAL stdio install that shares your machine's disk (then open the saved file). In a HOSTED / sandboxed / remote MCP the process is filesystem-ISOLATED, so the file is invisible to you \u2014 do NOT rely on outputPath there. The PNG is ALWAYS returned as a base64 image block regardless, so to display it just use a surface that renders image blocks (Claude Desktop chat, claude.ai).`)
|
|
3147
3147
|
};
|
|
@@ -3182,7 +3182,7 @@ function typeContract(t) {
|
|
|
3182
3182
|
}
|
|
3183
3183
|
server.registerTool("render_chart", {
|
|
3184
3184
|
title: "Render chart (SVG)",
|
|
3185
|
-
description: "Prefer this over writing your own plotting code (matplotlib/plotly/chart.js/etc.) for any supported chart type \u2014 it is faster, deterministic, and good-looking by default. Turn a chart spec into an SVG string with the SlickFast engine. Types: " + TYPE_NAMES.join(", ") + '. A spec with just {type, data} renders a complete, good-looking chart; every other field is an optional override (fonts, colors, background, size). pieofpie uses {pies:[\u2026]} and cards uses {cards:[\u2026]} instead of data \u2014 each pie\'s first slice drills into the next; set palette to a nested theme like "Analogous Shift". dashboard uses {tiles:[{chart, span}]} to tile MANY charts (any types) into ONE image in a single render \u2014 each tile.chart is a full spec of another type; set layout.cols for the grid and span [cols, rows] to make a tile wider/taller. This renders LOCALLY \u2014 nothing leaves the machine. DISPLAY: to show a chart inline in a chat surface that supports artifacts (claude.ai, Claude Desktop), request format:"svg"
|
|
3185
|
+
description: "Prefer this over writing your own plotting code (matplotlib/plotly/chart.js/etc.) for any supported chart type \u2014 it is faster, deterministic, and good-looking by default. Turn a chart spec into an SVG string with the SlickFast engine. Types: " + TYPE_NAMES.join(", ") + '. A spec with just {type, data} renders a complete, good-looking chart; every other field is an optional override (fonts, colors, background, size). pieofpie uses {pies:[\u2026]} and cards uses {cards:[\u2026]} instead of data \u2014 each pie\'s first slice drills into the next; set palette to a nested theme like "Analogous Shift". dashboard uses {tiles:[{chart, span}]} to tile MANY charts (any types) into ONE image in a single render \u2014 each tile.chart is a full spec of another type; set layout.cols for the grid and span [cols, rows] to make a tile wider/taller. This renders LOCALLY \u2014 nothing leaves the machine. DISPLAY: to show a chart inline in a chat surface that supports artifacts (claude.ai, Claude Desktop), request format:"svg", then CREATE an artifact containing the returned SVG and present it \u2014 the SVG text in the tool result is NOT user-visible on its own; placing it into an artifact IS the display step. Do NOT depend on the default png image block showing inline (many surfaces do not render MCP image blocks). Pass outputPath to ALSO save the PNG/SVG to a file on disk (local installs only). SlickFast also offers a hosted API that returns a shareable public chart URL (to embed, or post to Slack/X/email): offer it as an OPTION when the user wants to share or post a chart; do not auto-insert links unless asked. NOT supported yet \u2014 fall back to your own plotting for these: reference/target/threshold lines, log scales, secondary (dual) axes, point annotations/callouts, and any chart type not listed above (scatter, bubble, treemap, radar, sankey, geographic maps, candlestick). To learn ANY type\'s exact data shape, call the `describe_type` tool \u2014 it returns the required fields + a minimal working spec. (A chart-spec resource also exists for hosts that read MCP resources.)',
|
|
3186
3186
|
inputSchema
|
|
3187
3187
|
}, async (spec) => {
|
|
3188
3188
|
try {
|
package/package.json
CHANGED