Skip to main content
Glama

Create visual

create_visual

Create a visual with its document, size and position; with a ref already in this dashboard, return that visual with created false. A ref already used in this dashboard returns that visual, unchanged, with created false. Needs an API key: with none yet, call signup first.

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": {
      "dashboardId": "<dashboardId>",
      "type": "<type>",
      "document": "<document>"
    },
    "name": "create_visual"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoA slug you choose, 1 to 64 of a-z, 0-9 and -. Unique per owner for dashboards and per dashboard for visuals, and set once. Create with a ref so a later run finds the same object instead of making a duplicate.
sizeNoDefaults to the type's default size. Width and height within the type's limits, which describe_visual_types lists per type with the widths the editor offers.
typeYes
titleNoUntitled
documentYesThe visual's whole JSON document, valid for its type. Rules and an example per type: - bar: orientation is vertical. mode is grouped or stacked. Each data row is an object whose keys are exactly the xKey and each series key. Series values are numbers. xKey values are strings. No other keys. series has 1 to 6 items. data has at most 500 rows. Optional references: up to 6 items, each { value, label } for a flat line at a number (a value reference may take axis right when a series is on the right axis) or { at, label } for a marker at a category. A series may have as line (drawn as a line, never stacked); such a series may have dashed true and axis right. Keep at least one bar series. Example: {"orientation":"vertical","mode":"grouped","xKey":"month","series":[{"key":"revenue","label":"Revenue"},{"key":"cost","label":"Cost"}],"data":[{"month":"Jan","revenue":120,"cost":80},{"month":"Feb","revenue":140,"cost":90}]} - bar-horizontal: orientation is horizontal. mode is grouped or stacked. Each data row is an object whose keys are exactly the xKey and each series key. Series values are numbers. xKey values are strings. No other keys. Optional references: up to 6 items, each { value, label } for a flat line at a number or { at, label } for a marker at a category. Example: {"orientation":"horizontal","mode":"grouped","xKey":"month","series":[{"key":"revenue","label":"Revenue"},{"key":"cost","label":"Cost"}],"data":[{"month":"Jan","revenue":120,"cost":80},{"month":"Feb","revenue":140,"cost":90}]} - line: curve is linear, monotone, or step. Each data row is an object whose keys are exactly the xKey and each series key. Series values are numbers. xKey values are strings. No other keys. Optional references: up to 6 items, each { value, label } for a flat line at a number (a value reference may take axis right when a series is on the right axis) or { at, label } for a marker at a category. A series may have dashed true. A series may have axis left or right; keep at least one series on the left. Example: {"xKey":"date","curve":"monotone","series":[{"key":"users","label":"Users"}],"data":[{"date":"2026-01","users":10}]} - area: Same row rules as line. stacked is a boolean. Each data row is an object whose keys are exactly the xKey and each series key. Series values are numbers. xKey values are strings. No other keys. Optional references: up to 6 items, each { value, label } for a flat line at a number or { at, label } for a marker at a category. A series may have dashed true. Example: {"xKey":"date","curve":"monotone","stacked":false,"series":[{"key":"users","label":"Users"}],"data":[{"date":"2026-01","users":10}]} - pie: Each data row is an object whose keys are exactly nameKey and valueKey. nameKey values are strings. valueKey values are numbers greater than or equal to 0. At most 24 slices. donut is a boolean. Example: {"nameKey":"category","valueKey":"amount","donut":true,"data":[{"category":"New","amount":40},{"category":"Returning","amount":60}]} - kpi: label is a string, value is a number, format is number, compact, or percent. Optional prefix, suffix, delta, deltaFormat (number or percent), deltaLabel, and trend (up to 60 numbers, oldest first, in the same unit as value). No other keys. Example: {"label":"MRR","value":12840,"format":"number","prefix":"$","suffix":"","delta":0.12,"deltaFormat":"percent","deltaLabel":"vs last month"} - table: columns has 1 to 12 entries with key, label, align left or right, and format text, number, or percent. data has at most 200 rows. Each row's keys are column keys and hrefKey keys. Cell values are strings, numbers, or null. A text column may have statuses, a map from cell text to good, warn, or bad (1 to 20 entries). A number or percent column may have rules: 1 to 6 items, each { below or atLeast, status }; the first match wins. A text column may have hrefKey, a row key whose value (an http or https URL, null or empty) links the cell. Example: {"columns":[{"key":"name","label":"Name","align":"left","format":"text"},{"key":"amount","label":"Amount","align":"right","format":"number"}],"data":[{"name":"Acme","amount":10}]} - markdown: The only key is source, a string of at most 20000 characters. Example: {"source":"## Notes\n\n- Pipeline is up\n- See [status](https://example.com)"} - scatter: xKey and yKey values are numbers. labelKey is optional and its values are strings. Each row's keys are exactly xKey, yKey, and labelKey when labelKey is present. At most 500 points. Example: {"xKey":"price","yKey":"units","labelKey":"label","data":[{"price":10,"units":3,"label":"A"}]} - funnel: Each row's keys are exactly nameKey and valueKey. Names are strings. Values are numbers greater than or equal to 0. data may be empty or have at most 12 stages. Keep array order. Example: {"nameKey":"stage","valueKey":"count","data":[{"stage":"Visit","count":1000},{"stage":"Signup","count":400},{"stage":"Paid","count":80}]} - gauge: label is a string. value, min, and max are numbers with min less than max. suffix is an optional string. No other keys. Example: {"label":"Utilization","value":72,"min":0,"max":100,"suffix":"%"} - map: region is world, us-states or us-counties. idKey and valueKey name the row fields; labelKey is optional. format is number (default), compact or percent; prefix and suffix are optional strings. Each data row's keys are exactly idKey, valueKey and labelKey when set. The idKey value is a region code: for world an ISO 3166-1 alpha-2 code such as DE (alpha-3 accepted), for us-states a USPS code such as CA (two-digit FIPS accepted), for us-counties a five-digit county FIPS code such as 06037 (the 2017 county lines, leading zero kept); case is ignored. At most one row per region; a code with no shape on the map (Puerto Rico and the territories on us-states; territories drawn as part of their country on world; Connecticut's planning regions and Alaska's Chugach and Copper River on us-counties) is refused with the region's name. valueKey values are numbers. Example: {"region":"world","idKey":"country","valueKey":"signups","format":"number","data":[{"country":"US","signups":412},{"country":"GB","signups":138},{"country":"DE","signups":96},{"country":"IN","signups":87},{"country":"CA","signups":64},{"country":"BR","signups":41},{"country":"AU","signups":33},{"country":"JP","signups":19}]}
positionNoIndex in reading order; absent or past the end puts the visual last.
dashboardIdYesThe dashboard's id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false), the description discloses the dedup outcome: an already-used ref returns that visual unchanged with created false, so the agent knows a retry will not duplicate. It also discloses the auth requirement. Note a mild tension: the ref path is effectively idempotent, but the schema makes idempotentHint=false defensible since ref is optional and omitted refs do create duplicates.

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?

Front-loaded and short, but the ref-return rule is stated twice in near-identical sentences ("with a ref already in this dashboard, return that visual with created false" then "A ref already used in this dashboard returns that visual, unchanged, with created false"). One of those sentences should be cut; the rest earns its place.

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 7-parameter tool with a deeply nested document object and no output schema, the description covers the create-vs-return distinction and the auth gate, which is the risky part. It does not say what the response contains on success (visual id? the full object?), which matters for a create call that later tools will reference.

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 71% and the schema itself is exceptionally detailed (per-type document rules, ref slug pattern, size defaults, position semantics). The description only restates document, size and position generically rather than adding meaning. Baseline 3 applies because the schema carries the semantic load.

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?

"Create a visual with its document, size and position" states a concrete verb and resource and lists the main inputs, which separates it cleanly from update_visual and push_visual_data. It does not explicitly contrast itself with sibling write tools, but the create semantics plus the dedup rule make the intent unambiguous.

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?

Gives a concrete prerequisite and a routing instruction: "Needs an API key: with none yet, call signup first." It also tells the agent how a repeated call behaves when a ref is supplied, which is real usage guidance. It stops short of saying when to prefer update_visual or append_rows over re-creating.

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