Skip to main content
Glama
marsaplatform

Malja MCP

Official

Generate chart

generate_chart
Read-only

Render displacement metrics for one or more countries as Chart.js, Vega-Lite, Mermaid, or SVG chart specs. Supports normalization and changepoint markers.

Instructions

Render a displacement metric for one or more countries as a chart specification. Formats: "chartjs" (Chart.js v4 config JSON), "vega-lite" (v5 spec), "mermaid" (xychart block), "svg" (standalone image markup). Set normalize_by to plot per 1,000 residents or per US$1bn GDP. show_changepoints=true marks detected structural breaks (svg, vega-lite; Chart.js via chartjs-plugin-annotation).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoChart type (default line)
roleNo"asylum" = people hosted IN the country; "origin" = people displaced FROM the country
formatYesOutput format
localeNoLanguage of the human-readable text output: "en" (default) or "ar" (Modern Standard Arabic, right-to-left). Structured JSON fields, ISO3 codes and dataset ids stay in English either way.
metricNoMetric to plot (default refugees)
year_toNoLast year of the range (default: latest available)
countriesYesCountries to plot
year_fromNoFirst year of the range (default: 10 years back)
normalize_byNoNormalize values by a denominator: "population" → per 1,000 residents, "gdp" → per US$1bn GDP. Requires the worldbank provider.
show_changepointsNoMark detected changepoints (structural breaks) per series. Default false.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYes
unitYes
titleYes
formatYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds useful behavioral detail beyond the schema: the per-format rendering of changepoints (svg, vega-lite; Chart.js via chartjs-plugin-annotation) and the normalize_by scaling behavior.

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?

Three tight sentences, front-loaded with the core action before format/option details. Little waste, though the format list partially duplicates schema enum descriptions.

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 an output schema covering return values and annotations covering the safety profile, the description supplies the remaining context (formats, normalization, changepoints). Nothing essential to correct invocation is missing.

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%, so the schema already documents all ten parameters with enums and ranges. The description largely restates format and normalize_by semantics rather than adding new meaning, so the baseline 3 applies.

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 description states a specific verb and resource: 'Render a displacement metric for one or more countries as a chart specification.' The purpose is unmistakable and clearly distinct from generate_map or generate_country_report, though no sibling is named 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 implied by the task ('render ... as a chart specification') and format choices are enumerated, but there is no explicit when-to-use vs when-not guidance or named alternative tool. An agent must infer that this is the charting tool.

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