Skip to main content
Glama

eval_chart_transform

Read-only

Create a chart from data_refs (an array of snapshot IDs), a bounded JavaScript function, and chart_spec. Supports line, bar, area, waterfall, scatter, horizontal_bar, forecast_line, cohort_heatmap and sparkline_row. Query first and inspect rows; the transform takes one result per ref and returns flat rows. Cached values are already scaled: scale 3 means non-exempt metrics are in thousands; scale 0 means units. Percentages (75 means 75%), FTEs and other scale-exempt metrics retain their units. Do not scale again; y_scale is forced to 0. For multiple sources, inspect each scale and format; re-query same-unit series at a common scale, and use separately labelled axes for different units (line/bar/area) or separate charts. Conflicting nonempty caption scale labels are omitted; unlabelled sources leave other labels intact. Set axis unit labels explicitly.

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": {
      "data_refs": "<data_refs>",
      "transform_code": "<transform_code>",
      "chart_spec": "<chart_spec>"
    },
    "name": "eval_chart_transform"
  }
}

Input Schema

NameRequiredDescriptionDefault
data_refsYes
chart_specYes
transform_codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations declare readOnly/non-destructive/closed-world, and the description stays consistent while adding real behavioral detail the annotations cannot convey: values are pre-scaled and cached, y_scale is forced to 0, conflicting caption scale labels are dropped. It omits how 'bounded' JavaScript is enforced (sandbox limits, available API, failure behavior), which is the main behavioral unknown for a code-execution tool.

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

Conciseness3/5

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

Purpose is front-loaded and few sentences are pure filler, but the scaling/caption material is delivered as an undifferentiated block of prose with dense conditionals ('Conflicting nonempty caption scale labels are omitted; unlabelled sources leave other labels intact') that would read far better as bullets.

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

Completeness3/5

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

For a three-parameter tool with a nested free-form object and no output schema, the description covers inputs and scale handling well but never says what comes back (chart object? rendered image? spec?) or how transform_code is constrained. These gaps matter given the 0% schema coverage.

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 0% and chart_spec is a free-form object, so the description must compensate; it clarifies that data_refs are snapshot IDs taking one result each, that transform_code is a bounded function returning flat rows, and that chart_spec carries type, y_scale, axis labels and caption. It still leaves chart_spec's actual field names and the transform_code API surface undocumented.

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?

The first sentence gives a concrete verb and resource ('Create a chart') and enumerates the three inputs plus nine supported chart types, so an agent immediately knows what the tool produces. It does not explicitly contrast itself with siblings such as run_metric_data or inspect_rows, so differentiation is only implied by the 'Query first' phrasing.

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?

'Query first and inspect rows' routes the agent to the query/inspection siblings before calling this. The multi-source paragraph gives actionable conditions ('re-query same-unit series at a common scale', 'use separately labelled axes ... or separate charts'), though it never states a case where this tool should not be used.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.