Skip to main content
Glama
klar-mcp

klar-mcp

Official

Install Klar charts into a project

install_chart
Idempotent

Copy selected chart components and their required files into a React project, rewrite imports, update index.ts, and report missing packages plus usage snippets.

Instructions

Copies one or more charts into the project (default /src/klar): each chart component plus exactly the files it imports, klar.css and ThemeScope. Rewrites imports to relative paths, never overwrites existing files unless overwrite is true, and adds the charts to the generated index.ts. Returns the files written, the npm packages still missing, the CSS import step, and an import line and usage snippet per chart. Does not copy the rest of the kit or any dashboard.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_dir": "<project_dir>",
      "ids": "<ids>"
    },
    "name": "install_chart"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYesChart ids from list_charts, e.g. ["fin-candlestick", "sci-kaplan-meier"]
dry_runNoReport what would be written without writing
overwriteNoReplace files that already exist (discards local edits to them)
target_dirNoFolder inside the project to install intosrc/klar
project_dirYesAbsolute path to the project root (the folder with package.json)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial behavior beyond the idempotent/destructive hints: import rewriting to relative paths, the index.ts side effect, the no-overwrite default, and what the result contains. The only gap is a mild tension between destructiveHint=false and overwrite=true, which discards local edits; the description notes the overwrite rule but does not flag that mode as destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences, front-loaded with what gets copied and where, then the write semantics, then the return payload. The long return enumeration earns its place because no output schema exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a file-writing mutation with no output schema, the description covers side effects, overwrite policy, destination defaults, and the exact shape of the response (files written, missing packages, CSS step, import/usage snippets). Nothing an agent needs to call it correctly is absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all five parameters are already documented, including the overwrite warning and the default target_dir. The description reinforces ids provenance (list_charts) and the default install path but adds little syntax or format detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb (copies) plus resource (charts) plus precise scope: each chart component, exactly the files it imports, klar.css and ThemeScope. It also explicitly distinguishes itself from the dashboard installer with 'Does not copy the rest of the kit or any dashboard.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real selection context: ids come from list_charts, and the exclusion line steers dashboard installs elsewhere. It stops short of naming install_dashboards as the alternative or stating prerequisites (e.g., that missing npm packages are only reported, not installed).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.