Skip to main content
Glama

Get widget data

get_widget_data
Read-only

Read the numbers behind data widgets, for charting them. Returns one entry per widget: its name, its saved chart type, its state, and — once its fetch has landed — the metric and dimension labels, the period totals, the previous period's totals, and the rows. chart is the visualization the widget is saved as and the one the app renders: draw it as that. score is a single KPI value (read it from summary, not the rows), table is a table, map is geographic, and the rest are line / area / bar / column / pie / donut / funnel. Stored variants map to their family — spline and areaspline are line and area, stacked_ and 3d_ prefixes are the type they name. chart is present while a widget is still fetching too, so a placeholder can take the right shape. Pass widget_ids for the widgets a call touched, or source_id for every data widget on a report. A widget in state "loading" is still fetching and carries no rows yet — call again for it. "demo" means the datasource is not linked to the client and the numbers shown in the app are placeholders; "error" means its last fetch failed. Rows are capped at row_cap and truncated says whether any were cut. datasource_type says how to read the entry: a Static Value widget (CUSTOM_DATA) shows the value field and has no series; a GOALS widget plots its summary against the target, which list_goals holds; CALCULATION rows are keyed by the calculated metric id, whose name is the matching metric label. A metric that carries a symbol (percent, currency, decimal…) is formatted that way in the app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNoWait up to 15 seconds for in-flight fetches to land, returning as soon as they all have. Default true
row_capNoRows returned per widget (default 200)
source_idNoRead every data widget on this report instead (report id from list_reports)
widget_idsNoWidgets to read (ids from list_widgets, or widget_id from add_data_widget). Up to 200 — use source_id for a whole report

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoOne entry per widget — its name, state, the `chart` it is saved as, the metric and dimension labels, this period's summary totals, the previous period's, and the rows (capped at row_cap, with `truncated` saying whether any were cut). A widget in state "loading" is still fetching and carries no rows yet.
successYesTrue when the call succeeded. A failure comes back as an error result instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "description": "One entry per widget — its name, state, the `chart` it is saved as, the metric and dimension labels, this period's summary totals, the previous period's, and the rows (capped at row_cap, with `truncated` saying whether any were cut). A widget in state \"loading\" is still fetching and carries no rows yet."
      +    },
      +    "success": {
      +      "description": "True when the call succeeded. A failure comes back as an error result instead.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description goes far beyond that by explaining the full behavior: what fields are returned, how chart types map to families, how to interpret states like 'loading', 'demo', and 'error', row cap and truncation, and how different datasource types change the reading. This is exceptional behavioral disclosure that lets an agent predict exactly what to expect.

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?

Despite its length, every sentence in the description carries essential information. It is front-loaded with the core purpose, then systematically covers return fields, chart types, states, parameter usage, and datasource handling. There is no fluff or redundancy. The structure makes complex content easy to parse.

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 tool with this level of complexity—multiple widget types, states, and return formats—the description is remarkably complete. It covers return structure, chart type mapping, loading and error states, row limits, and datasource-specific interpretation. It also references the output schema indirectly by describing the entry shape. An agent has everything needed to call the tool correctly and interpret results.

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 description coverage is 100%, so all four parameters are already documented. The description adds meaningful context beyond the schema: it explains the relationship between widget_ids and source_id (mutually exclusive use cases), references row_cap and wait indirectly, and clarifies that widget_ids comes from list_widgets or add_data_widget. This enriches the parameter semantics without repeating schema text.

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?

The description states a specific verb ('Read') and a clear resource ('the numbers behind data widgets'), with an explicit purpose ('for charting them'). It distinguishes itself from siblings like get_widget or list_widgets by focusing on data values rather than configuration or listing. The level of specificity leaves no ambiguity about what the tool does.

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?

The description gives clear usage conditions for the parameters: 'Pass widget_ids for the widgets a call touched, or source_id for every data widget on a report.' It also explains the purpose of the wait parameter and the row_cap, and describes the states that indicate when to re-call. It does not explicitly name alternative tools for comparison, but the usage context is strong enough for an agent to decide when to use this tool.

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.

Resources