@bicharts/chart-mcp 0.1.1 → 0.2.0
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 +19 -0
- package/dist/index.mjs +45 -45
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -28,6 +28,25 @@ An MCP (Model Context Protocol) stdio server that lets any MCP-capable AI client
|
|
|
28
28
|
you can open with no build step. It is **off by default** — the code is meant to be
|
|
29
29
|
merged into your app, not run as an index.html.
|
|
30
30
|
|
|
31
|
+
## generate_chart's machine-readable result
|
|
32
|
+
|
|
33
|
+
`generate_chart` answers on two channels. The text block is for a human (and for hosts that
|
|
34
|
+
only render text); `structuredContent` is for code, so nothing has to string-parse
|
|
35
|
+
`--- code ---` out of prose:
|
|
36
|
+
|
|
37
|
+
| field | |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `code` | the `render()` source (omitted when `include_code: false`) |
|
|
40
|
+
| `chartName`, `language`, `version`, `creditCost` | what was produced, and what it cost |
|
|
41
|
+
| `correlationId` | the handle into the server-side log — quote it in any support request |
|
|
42
|
+
| `requiredD3Plugins` | packages the code calls, e.g. `["d3-sankey"]` — install and `Object.assign` them onto the **same** d3 you pass the host, or the chart throws mid-render |
|
|
43
|
+
| `geo` / `geoPoint` | region/basemap wiring, and how many points actually placed |
|
|
44
|
+
| `data` **or** `files` | the render payload inline, **or** the paths written — never both |
|
|
45
|
+
| `hostContract`, `build` | the contract the code targets, and the bundle that served the call |
|
|
46
|
+
|
|
47
|
+
`data` carries the appended `__geoIso__` / `__geoLat__` / `__geoLon__` columns, which a caller
|
|
48
|
+
cannot reconstruct from the source data — so a geo chart needs either it or `files.data`.
|
|
49
|
+
|
|
31
50
|
## Language & renderer
|
|
32
51
|
|
|
33
52
|
Both list/generate tools speak **language** (what your project is written in) as well as
|