# Using WestCoast Charts with your coding tools

> WestCoast Charts 1.1.5, release, public Core release, on npm. HTML: https://westcoast-charts.com/agents/ · Index for agents: https://westcoast-charts.com/llms.txt

Start with the same documented configuration, whether you work in a terminal, editor or agent client. Read llms.txt, give your agent the relevant Markdown pages and merge the repository instructions. Use CLI or MCP only when that interface is configured in your environment.

## Try the browser correction

The HTML page includes an explicit, button-driven example using the pinned browser validator. Its intentional legend.enabled typo produces an issue and fix. Applying the fix revalidates, renders three illustrative request values (12, 19, 7), and displays the real chart.describe() result. No MCP server is called. The complete editable workflow is in the [Agent Lab](https://westcoast-charts.com/playground/).

## Read, configure, verify

1. Read [llms.txt](https://westcoast-charts.com/llms.txt) and choose a [gallery example](https://westcoast-charts.com/gallery/index.md).
2. Review and merge [AGENTS.md](https://westcoast-charts.com/agents/AGENTS.md) into project instructions; do not overwrite existing rules.
3. Validate options, apply fixes, render and inspect chart.describe(). The [Agent Lab](https://westcoast-charts.com/playground/) demonstrates this browser workflow.

## MCP: discover, validate, render, describe

Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. The website browser uses Library 1.1.5. The command-line and MCP guides list tested chart modules, runtime setup and limitations. This page does not connect to an MCP server.

## Install CLI and MCP

Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. The command below installs both the current Core runtime and the tools. Premium is a separately supplied runtime; it is not included in either public archive. Premium customers replace the Core installation command with their private complete library package; see the Premium setup section in the MCP guide.

```sh
npm install west-coast-charts@1.1.5
npm install west-coast-charts-agent@0.2.3
npx --no-install wcc --help
npx --no-install wcc-mcp --help
```

[Agent-tool source and release](https://github.com/Lokumbus/west-coast-charts-agent). Agent archive SHA-256: `ca2c7af4a00d69f2d463d310139480aca8cef4e06163897d86b1ed90da4e7865`. Read `wcc://version` after connecting to verify the resolved library, validator and description providers.



1. **Discover** — `list_chart_types · list_examples · get_example · get_schema`. Choose a supported type, retrieve a starting spec and request only the schema path you need.
2. **Validate** — `validate_chart`. Read errors and warnings, apply the supplied hints, then validate again until ok is true. Validation does not establish that the data tells the right story.
3. **Render** — `render_chart`. Return SVG or PNG with a verification table. Use delivery: "link" when the image bytes are not needed in the model context.
4. **Describe** — `describe_chart`. Read the drawn values as JSON or Markdown. Check units, aggregate functions, hidden series and tableSource before making a claim.

Illustrative request and selected response fields, checked against the tool contract. Not executed on this page. The current tools require the real e1 validator; a missing provider is an explicit error.

```json
{
  "name": "validate_chart",
  "arguments": {
    "spec": {
      "chart": {
        "type": "bar"
      },
      "series": [
        {
          "name": "Revenue",
          "data": [
            12,
            19,
            7
          ]
        }
      ],
      "legend": {
        "enabled": false
      }
    }
  }
}
```

```json
{
  "structuredContent": {
    "ok": false,
    "validator": "e1",
    "errors": [
      {
        "kind": "unknown_option",
        "path": "legend.enabled",
        "pointer": "/legend/enabled",
        "suggestion": "legend.show",
        "fix": {
          "op": "rename",
          "from": "legend.enabled",
          "to": "legend.show"
        }
      }
    ],
    "warnings": []
  }
}
```

Read the [MCP contract and setup](https://westcoast-charts.com/docs/mcp/index.md). Read `wcc://version` on a connected server to identify its actual server, render-core, library and font versions.

### Results and errors

- Successful tools return `structuredContent`. For render_chart and describe_chart, the inspection model is `structuredContent.table`; provenance is the sibling `tableSource`. The current release requires `tableSource: "describe"` from the real library module; a missing provider is an explicit failure. Do not treat a stub or null model from an older server as full inspection. For row counts, inspect `structuredContent.table.table.total` and `structuredContent.table.table.truncated` inside that model. Even a full model can have unsupported/null fields.
- `validate_chart` returning `ok: false` is a normal validation result. Require `validator: "e1"`, the real schema validator. Current tools fail explicitly if that module is unavailable. Validation does not check the business meaning of data or confirm a valid Premium key.
- Tool failures use `isError: true`. In this snapshot, parse the JSON error envelope from the second text block in `content`, not structuredContent: `{error:{kind,message,hint,details}}`. Follow the hint and revalidate; do not silently ignore warnings or sum percentiles/rates.

### Resources, prompts and limits

Resources: `wcc://docs/agent-quickstart`, listed `wcc://docs/{slug}`, `wcc://errors`, `wcc://version` and the last 32 `wcc://renders/{id}` outputs. Prompts: `build_dashboard` and `pick_chart_type`. Use narrow schema slices, paginated examples and delivery: "link" to limit model context.

The seven MCP tools compute results and do not write files or make outbound chart-data requests. They accept JSON, not formatter functions. HTTP authentication can fetch a configured JWKS; this is a network exception outside chart computation. Size and pixel limits apply. CLI `chart export` and `skills install` do write files; check overwrite/confirmation flags in the [CLI reference](https://westcoast-charts.com/docs/cli/index.md).

Premium headless rendering needs a configured key, or explicit evaluation mode with an unlicensed watermark. Use server environment/configuration or documented HTTP headers; keep keys out of shared specs and examples. Missing or rejected keys return kind `license` and details.reason `license_required` or `license_invalid`. Browser localhost evaluation does not imply that headless tools bypass licensing. The [30-day trial availability](https://westcoast-charts.com/pricing/#trial) includes all 13 families, including Quint, Vitals Clock and Practice Schedule. Start the trial on the pricing page; viewing examples alone does not issue a key or start a trial.

## Endpoints

- Curated index: `https://westcoast-charts.com/llms.txt`. Start here. Small; links to the Markdown version of every page that matters.
- Linked Markdown pages: `Follow the explicit index.md link`. e.g. https://westcoast-charts.com/docs/getting-started/index.md. Original sample pages and some legal pages are HTML-only.
- Content negotiation: `Accept: text/markdown`. Pages with a published Markdown twin return that twin with Vary: Accept; otherwise read HTML.
- Discovery links: `rel="alternate" type="text/markdown", rel="describedby"`. Authored pages with a Markdown twin advertise it in their head. Follow that URL rather than guessing.
- Every Markdown page: `https://westcoast-charts.com/docs/sitemap.md`. All docs and gallery pages in one list.
- All docs in one file: `https://westcoast-charts.com/llms-full.txt`. Optional, for clients that read a single document URL.

## Repository instructions

- [Repository instructions](https://westcoast-charts.com/agents/AGENTS.md): `AGENTS.md`. Review and merge into your existing instructions. Use with an agent that reads AGENTS.md, or provide the text as context.
- [Copilot instructions](https://westcoast-charts.com/agents/copilot-instructions.md): `.github/copilot-instructions.md`. Optional format for GitHub Copilot. Merge with existing project instructions.
- [Cursor rule](https://westcoast-charts.com/agents/westcoast-charts.mdc): `.cursor/rules/westcoast-charts.mdc`. Optional .mdc format for Cursor projects. Review the file scope before adding it.

```sh
curl -fsSL https://westcoast-charts.com/agents/AGENTS.md -o westcoast-charts.instructions.md
# Review this file, then merge the relevant rules into your project instructions.
```

## Execution interfaces and status

- [Structured option validation](https://westcoast-charts.com/docs/errors/) (Browser · 1.1.5): Schema version, issue kind, severity, dotted path, JSON Pointer, suggestions and machine-applicable fixes. applyFixes() returns a corrected copy; validate it again before rendering.
- [chart.describe()](https://westcoast-charts.com/docs/reference/methods/#methods-added-by-features) (Browser · 1.1.5): JSON, table or Markdown from the rendered state: values, units, aggregate functions, scale domains, extrema, filters and hidden series where supported. Fields may be null; respect table.total and table.truncated.
- [Options and result schemas](https://westcoast-charts.com/wcc/schema/wcc-options.schema.json) (Machine-readable contracts): The options schema carries x-wcc-version. The separate wcc-describe/1 result schema defines the inspection model. MCP get_schema supports narrow dotted paths and depth limits.
- [Imports and working examples](https://westcoast-charts.com/docs/getting-started/) (Browser · 1.1.5): Each gallery page includes configuration and its import recipe. Validation, describe(), features and layers are optional modules; Quint requires layers/quint in addition to Premium.
- [Vitals and scheduling modules](https://westcoast-charts.com/docs/medical/) (Browser modules · 1.1.5): Explicit layers/vitals and layers/schedule imports add vitalsClock and schedule. Schedule helpers compute conflicts, utilization and patient-flow summaries without a chart; these are module APIs, not new MCP tools. Use the current tool module matrix and an explicitly installed complete Premium runtime for headless rendering.
- [Orient radial views](https://westcoast-charts.com/docs/features/orient/) (Optional MIT feature · 1.1.5): Rotate a supported radial view without changing its data. Load features/orient with the core; /full already includes it. Orientation is described in accessible text and chart.describe() when that module is loaded. Check the current headless support matrix; Orient describes orientation, not a change to data values.
- [Headless command line](https://westcoast-charts.com/docs/cli/) (Agent tools · 0.2.3): wcc validates, renders SVG/PNG, exports files and prints verification tables. Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Check the resolved library version, validator and tableSource before relying on inspection.
- [MCP server](https://westcoast-charts.com/docs/mcp/) (Agent tools · 0.2.3): Seven tools, Markdown resources, version discovery and two reusable prompts over stdio or Streamable HTTP. Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm.

## Browser integration recipe

Library 1.1.5; optional modules included in the public Core distribution. Example for a page containing a #chart element; not executed by this Markdown page.

```js
import WestCoastCharts from 'west-coast-charts'
import validatorPlugin from 'west-coast-charts/agent/validate'
import describePlugin from 'west-coast-charts/agent/describe'

WestCoastCharts.use(validatorPlugin).use(describePlugin)

const options = {
  chart: { type: 'bar' },
  series: [{ name: 'Revenue', data: [12, 19, 7] }],
  xaxis: { categories: ['Q1', 'Q2', 'Q3'] },
}
const report = WestCoastCharts.validate(options)
const fixed = WestCoastCharts.applyFixes(options, report.issues)
if (!WestCoastCharts.validate(fixed).ok) throw new Error('Resolve remaining option issues')
const chart = new WestCoastCharts(document.querySelector('#chart'), fixed)
await chart.render()
const model = chart.describe({ format: 'json' })
const markdown = chart.describe({ format: 'markdown' })
```

- [Options schema](https://westcoast-charts.com/wcc/schema/wcc-options.schema.json)
- [Describe result schema](https://westcoast-charts.com/wcc/schema/wcc-describe.schema.json)
- [Validator fields and error kinds](https://westcoast-charts.com/docs/errors/index.md)

## Vitals Clock and Practice Schedule

Vitals Clock displays measurements in time slots, marks unmeasured slots separately from zero and shows the age of the last values. Practice Schedule shows rooms, people and appointments; moves and resizes emit proposals for the caller to accept and redraw. Bands, alarms and scores come from the calling application. The library supplies no clinical thresholds or clinical score/alarm decisions. The original examples use invented demo data and thresholds.

These separate Premium type modules are not autoloaded. Import and register the modules you use before creating a chart. With script tags, load core and Premium before dist/layers/vitals.min.js or dist/layers/schedule.min.js.

```js
import WestCoastCharts from 'west-coast-charts'
import premium from 'west-coast-charts/premium'
import vitals from 'west-coast-charts/layers/vitals'
import schedule from 'west-coast-charts/layers/schedule'

WestCoastCharts.use([premium, vitals, schedule])
// Load only the type modules your application uses.
// Neither vitalsClock nor schedule is autoloaded.
```

The schedule module also provides standalone conflicts(), utilization(), utilizationSeries() and flow.fromEvents() helpers. They are library APIs, not additional MCP tools. Patient-flow summaries retain median/P90 waiting times; do not sum these statistics. See [the data and helper contracts](https://westcoast-charts.com/docs/medical/index.md) and [original demos](https://westcoast-charts.com/examples/#medizin-praxis). The separately versioned agent tools target Library 1.1.5; see their current module matrix.

## Optional MIT feature: Orient

Orient is an optional MIT feature for pie, donut, polarArea, radialBar, Premium chord and radialColumn with its layers. It turns the view while keeping labels upright and preserving data values. Orientation survives data updates and resizes, and participates in perspectives, history and share links when those features are loaded. Reduced motion or animate: false skips the transition. Other chart types are unsupported; there is no 3D tilt or free-angle dragging.

The plain Core entry stays lean; load the feature only when needed. The /full entry already installs it. With script tags, load dist/west-coast-charts.min.js, then dist/features/runtime.min.js, then dist/features/orient.min.js, in that order, before initialising the chart. The ESM import below loads runtime.esm.js through its own dependency; no extra runtime import is needed. This browser recipe uses the MIT Core 1.1.5 distribution and a page containing #chart; it is not executed here.

```js
import WestCoastCharts from 'west-coast-charts'
import orient from 'west-coast-charts/features/orient'

WestCoastCharts.use(orient)
const chart = new WestCoastCharts(document.querySelector('#chart'), {
  chart: { type: 'donut', orient: { enabled: true } },
  labels: ['Direct', 'Search', 'Referral'],
  series: [44, 35, 21],
})
await chart.render()
await chart.orient.rotateTo('Search', 'top', { animate: false })
const orientation = chart.orient.get()
const description = chart.orient.describe()
// await chart.orient.reset()
```

[Orient API and controls](https://westcoast-charts.com/docs/features/orient/index.md) · [Try the original Orient examples](https://westcoast-charts.com/examples/#radial-orient)

## Choosing a client

For Codex, Claude Code, Hermes, Cursor or Copilot, choose the interface your configured environment actually exposes. Markdown and downloadable rule files are provided here; this is not a claim of tested compatibility with every client or version. The MCP guide includes stdio configuration examples for Claude Code, Cursor and VS Code. No Hermes-specific adapter or setup is verified here.

Cursor users can optionally add the docs URL through @Docs: https://westcoast-charts.com/docs/. A single-file alternative is https://westcoast-charts.com/llms-full.txt.

## The rules

WestCoast Charts (1.1.5, release, public Core release, on npm) is an ApexCharts-4.x-compatible charting library. Docs for agents: https://westcoast-charts.com/llms.txt

- Install the current MIT Core with `npm install west-coast-charts@1.1.5`. Alternative versioned archives and checksums: https://westcoast-charts.com/download/index.md. Import the default export: `import WestCoastCharts from 'west-coast-charts'`. Do not import from `apexcharts`.
- Create charts with `const chart = new WestCoastCharts(element, options)` and `await chart.render()`; call `chart.destroy()` when the element is removed (React effect cleanup, Vue `onBeforeUnmount`, Svelte `onDestroy`, Angular `ngOnDestroy`).
- Options use the ApexCharts 4.x format. Before using an option you are not sure about, look it up in https://westcoast-charts.com/docs/reference/options/index.md (premium types: https://westcoast-charts.com/docs/reference/premium-options/index.md). Never guess option names.
- Extra MIT chart types (gauge, funnel, waterfall, sunburst, ...): `import types from 'west-coast-charts/types'` and `WestCoastCharts.use(types)`, or import one type, e.g. `'west-coast-charts/types/gauge'`.
- Premium types (sankey, chord, gantt, tree, stock, map, marimekko, network, radialColumn, quintTimeline, quintConvergence, vitalsClock, schedule): `import premium from 'west-coast-charts/premium'`, `WestCoastCharts.use(premium)`, and `WestCoastCharts.setLicenseKey(key)` read from configuration, never hard-coded. Localhost evaluation needs no key. The Free Core and MIT-marked source remain under their stated MIT licence; Premium distribution, updates and support have separate business terms. See https://westcoast-charts.com/maintenance/#licensing and https://westcoast-charts.com/terms/.
- Quint types (`quintTimeline`, `quintConvergence`) also use the separate module: `import quint from 'west-coast-charts/layers/quint'` and `WestCoastCharts.use(quint)`. It is not part of the Premium bundle. Read https://westcoast-charts.com/docs/quint/index.md for lanes, units and the labelled time-axis lens.
- If `render()` rejects naming a missing import, add that import; do not switch to another chart type.
- Medical/practice types require explicit modules in addition to Premium: `west-coast-charts/layers/vitals` for `vitalsClock`, and `west-coast-charts/layers/schedule` for `schedule`. They are not autoloaded. Bands, alarms and scores come from the caller; the library supplies no clinical thresholds or clinical score/alarm logic. Schedule changes are proposals; the caller decides and updates the model. Read https://westcoast-charts.com/docs/medical/index.md.
- Orient is optional MIT: import and register `west-coast-charts/features/orient` with the core runtime before creating the chart. /full already includes it. Supported types and limits: https://westcoast-charts.com/docs/features/orient/index.md. It is not a Premium family; check the current headless module matrix before using it through CLI or MCP.
- Update data with `chart.updateSeries(series)` or `chart.updateOptions(options)` instead of re-creating the chart.
- For machine-readable validation, load `west-coast-charts/agent/validate`, use `WestCoastCharts.validate(options)`, inspect `issues`, apply suggested fixes with `WestCoastCharts.applyFixes(options, issues)` and validate again.
- Load `west-coast-charts/agent/describe` and call `chart.describe({format: "json"})` after rendering for values, aggregates, scales, filters and table from the actual drawn state. Do not sum non-additive measures.
- Inspect `schemaVersion` and the options schema https://westcoast-charts.com/wcc/schema/wcc-options.schema.json. Result schema: https://westcoast-charts.com/wcc/schema/wcc-describe.schema.json. Respect missing/null fields and table truncation; never infer unavailable aggregates from a stub result.
- With MCP, discover available types/examples and narrow schema paths before validating, rendering and describing. Require `validator: "e1"` and `tableSource: "describe"` for the current tools; absent providers must fail explicitly rather than silently substituting stubs. Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Verify the resolved runtime and current module support before using Quint, Orient, vitalsClock or schedule. Tool errors use `isError` and a JSON envelope in the second text content block. See https://westcoast-charts.com/agents/index.md.
- Headless Premium rendering requires a configured key or explicit evaluation mode; browser localhost behaviour does not remove this requirement. Keep licence keys out of shared specs. The seven MCP tools do not write files; CLI export and skills-install commands do.
- For a working starting point, copy a gallery example: https://westcoast-charts.com/gallery/index.md (every entry has its full options).
