Skip to main content
Glama

Get embed code

get_embed_code
Read-onlyIdempotent

Generates embed codes and standalone URLs for published Datawrapper charts, with responsive iframe, script, AMP and oEmbed options plus display flags.

Instructions

Datawrapper: embed codes for a published chart — responsive iframe, fixed iframe, script embed (web component, no iframe), Google AMP or oEmbed — optionally with render flags (dark mode, plain without header/footer, static without interactivity, logo on/off, transparent background, fitchart, table search). Also returns the shareable standalone URL. Uses no API quota.

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_id": "<chart_id>"
    },
    "name": "get_embed_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
flagsNoRender flags, added to the iframe URL or as data attributes of the script embed.
heightNoiframe variant: fixed height in px (e.g. with fitchart).
variantNoresponsive (default): iframe that resizes itself. script: web component. all: every variant.
chart_idYes
max_widthNooembed only: maximum width in px.
max_heightNooembed only: maximum height in px.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, so the safety profile is covered; the description adds real value beyond that by disclosing the quota-free cost, the return of a standalone shareable URL, and the concrete effect of each render flag.

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?

Front-loaded with the resource and tightly packed into two sentences with no filler; the dense em-dash list of variants and flags is information-rich but slightly hard to scan.

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?

No output schema exists, and the description does state that embed codes plus a standalone URL are returned, though it does not describe the response shape when variant is 'all' (map of variants vs flat). For a read-only tool with strong annotations this is nearly complete.

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 83%, so the baseline is 3, but the description goes further by explaining what 'responsive' and 'script' actually produce and by glossing the render flags (dark mode, plain, static, logo, transparent, fitchart, table search). Only the oEmbed-only width/height limits are left to the schema.

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?

States a specific verb+resource ('embed codes for a published chart') and enumerates the exact output forms (responsive iframe, fixed iframe, script/web component, AMP, oEmbed), which lets an agent distinguish it from get_chart or export_chart 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 Guidelines3/5

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

Usage context is only implied: the phrase 'for a published chart' signals the publish-state prerequisite, and 'Uses no API quota' hints it is cheap to call. There is no explicit when-to-use-vs-alternatives guidance (e.g., versus export_chart or preview_chart), so the agent must infer routing.

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