Skip to main content
Glama

Analyze data

analyze_data
Read-onlyIdempotent

Profiles a dataset—column types, number format, and ranges—then recommends 1–4 suitable chart types with column mappings and reasons. Use before creating a chart when the best chart type is unclear.

Instructions

Datawrapper: profile a dataset (column types, number format, ranges) and recommend 1–4 suitable chart types with the column mapping and a reason. Runs locally — no API calls, no quota. Use before create_chart when unsure which chart fits.

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": "<data>"
    },
    "name": "analyze_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesExactly one data source. Use csv/rows/columns for inline data (best below ~10,000 rows; line charts below ~1,000 points).
goalNoWhat the chart should show, e.g. 'change over time', 'compare countries'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.3.0
    • changedInput schema / properties / data / description
      Previous value: -"Exactly one data source. Use csv/rows/columns for inline data (≤10,000 rows)."New value: +"Exactly one data source. Use csv/rows/columns for inline data (best below ~10,000 rows; line charts below ~1,000 points)."
    • addedInput schema / properties / data / properties / external_metadata_url
      Added value: +{
      +  "description": "With external_url: public URL of a JSON file with chart properties (e.g. {\"title\": …, \"describe\": {\"intro\": …}}) that the chart reads live, so titles and notes can change without republishing. Its values override the ones set on the chart.",
      +  "format": "uri",
      +  "type": "string"
      +}
    • changedInput schema / properties / data / properties / external_url / description
      Previous value: -"Public URL of a CSV (or JSON for locator maps) that Datawrapper fetches itself, making the chart update when the source changes (live data)."New value: +"Public URL of a CSV (or JSON for locator maps) that Datawrapper fetches itself (live data): every minute for 24 h after publishing, then hourly until 30 days after the last publish. Google Sheets links are turned into their CSV export URL."
    • changedInput schema / properties / data / properties / google_sheet / description
      Previous value: -"URL of a Google Sheet shared publicly ('Anyone with the link can view'). Datawrapper keeps the chart in sync."New value: +"URL of a Google Sheet shared publicly ('Anyone with the link can view'). Datawrapper re-reads it when the chart is opened in its editor; published charts change on republish. For live updates pass the same URL as external_url."
    • addedInput schema / properties / data / properties / pivot
      Added value: +{
      +  "description": "Long → wide: Datawrapper needs one column per series. Turns long data (Year, Country, Value) into wide data (Year, Germany, France, …) before upload.",
      +  "properties": {
      +    "aggregate": {
      +      "description": "How to combine duplicate index/column pairs (default sum).",
      +      "enum": [
      +        "sum",
      +        "mean",
      +        "first"
      +      ],
      +      "type": "string"
      +    },
      +    "columns": {
      +      "description": "Column whose values become the new columns / series (e.g. 'Country').",
      +      "type": "string"
      +    },
      +    "index": {
      +      "description": "Column whose values become the rows (usually the x axis, e.g. 'Year').",
      +      "type": "string"
      +    },
      +    "values": {
      +      "description": "Numeric column with the values.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "index",
      +    "columns",
      +    "values"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the description's main contribution is the operational note that it "runs locally — no API calls, no quota." That is genuinely new information an agent would act on (safe to call repeatedly, no rate-limit concern) and it also previews the shape of the result (1–4 chart types plus mapping plus reason). It doesn't discuss dataset-size limits, but the schema covers that.

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?

Three tight sentences, front-loaded with the action, then the behavioral caveat, then the routing rule. Every clause carries information — the parenthetical enumeration defines what "profile" means, and the final sentence is pure routing value.

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 read-only local analysis tool with no output schema, the description supplies the missing return contract (1–4 recommendations with mapping and reason) and removes the main agent concern about calling it (cost/quota). Complexity from the nested data source is fully absorbed by the schema's own descriptions.

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 description coverage is 100%, including detailed nested descriptions for csv/rows/columns/pivot/external_url, so the baseline is 3. The description adds only a loose notion of dataset and profiling and never mentions the goal parameter, which is where extra meaning (e.g. how goal steers recommendations) would have been valuable.

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 names a specific verb pair and resource: profile a dataset (column types, number format, ranges) and recommend 1–4 chart types with column mapping and a reason. It also scopes itself to Datawrapper and distinguishes itself from the write-side sibling create_chart, so an agent can tell what it does without opening the schema.

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?

"Use before create_chart when unsure which chart fits" gives an explicit trigger condition and names the alternative tool. The when-not case is only implied by "when unsure" — it never says to skip this when the chart type is already known — so it falls just short of full routing guidance.

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