Skip to main content
Glama

Build Chart Config

build_chart_config

Builds a complete chart configuration for ui_config.json from chart parameters, enabling AgentUI Dash to render dashboard charts without manual config assembly.

Instructions

Build a complete chart config dict for ui_config.json.

⚠️ IMPORTANT: The color field in charts is a COLUMN NAME for grouping, NOT a hex color. If you want a single-color chart, omit color entirely. Hex colors (like "#246bfd") are only for KPI cards, not charts.

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": {
      "chart_json": "<chart_json>"
    },
    "name": "build_chart_config"
  }
}

Input Schema

NameRequiredDescriptionDefault
chart_jsonYesJSON string with chart parameters: { "tipo": "bar", "sql": "SELECT branch, SUM(total_usd) AS Sales FROM sales GROUP BY branch", "titulo": "Sales by Branch", "x": "branch", "y": "Sales", "alto": 380 }

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose one genuinely important behavioral trap (color is a grouping column, not a hex value, and should be omitted for single-color charts), which prevents a common misuse. However, it never says whether the tool merely returns a dict or persists anything to ui_config.json, nor what happens on invalid chart_json, which leaves the mutation/side-effect profile ambiguous.

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

Conciseness4/5

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

Purpose is front-loaded in one sentence, followed by a clearly marked warning about the single highest-risk field. No filler or repetition; the emphasis marker is justified given the cost of getting `color` wrong.

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

Completeness4/5

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

With one fully documented parameter and an output schema present, the definition need not explain return values, and it covers the key semantic hazard. Minor gaps remain: valid chart types are not referenced (list_chart_types exists as a sibling) and there is no statement about whether the produced config is written or merely returned.

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

Parameters4/5

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

Schema coverage is 100% and the single parameter's schema description already contains a full JSON example, so the baseline is 3. The description goes beyond it by clarifying the semantics of the `color` field (a field absent from the example entirely) and by instructing when to omit it, adding real meaning not present in the schema.

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

Purpose4/5

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

States a specific verb and artifact: 'Build a complete chart config dict for ui_config.json.' The resource ('chart config') is clear enough to distinguish it from build_kpi_config and build_filter_config, though it never names those siblings explicitly.

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

Usage Guidelines3/5

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

Usage is only implied: the contrast 'hex colors are only for KPI cards, not charts' hints that KPI work belongs to a different builder, but there is no explicit when-to-use statement, no mention of list_chart_types or recommend_chart as upstream helpers, and no preconditions for calling this tool.

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