Skip to main content
Glama
Discourse Graph MCP Server

Discourse Graph MCP Server

Official

canvas_add_image

Places an image on a tldraw canvas from an HTTPS or data URI URL, creating the asset and image shape. Pass real pixel dimensions when known, since the canvas does not measure the file.

Instructions

Place an image on a canvas from a URL (creates the tldraw asset + image shape). Pass real dimensions when known; the canvas does not measure the file.

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": {
      "canvas": "<canvas>",
      "src": "<src>"
    },
    "name": "canvas_add_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
hNoDisplay height (default 300)
wNoDisplay width; pass the real pixel width when known (default 400)
xNo
yNo
srcYesImage URL (https or data URI). For local files, upload to Roam first (e.g. the roam MCP's file_upload) and pass the resulting URL.
nameNoFilename shown in summaries
pageNoTldraw page to target (name or page record id), for canvases with several pages — see canvas_read `pages`. Omit on single-page canvases.
graphNoGraph name or nickname. Auto-selects if only one graph is configured.
canvasYesCanvas page title (e.g. 'Canvas/My Map') or its 9-char page uid

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose a real behavioral trait — that an asset plus shape is created and that the tool will not measure image dimensions — but says nothing about return values, placement behavior when x/y are omitted, or failure modes for bad URLs.

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?

Two tight sentences, front-loaded with the action and the caveat, with no filler. Every clause carries information an agent would otherwise have to guess.

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?

With nine parameters and no annotations or output schema, the description covers only the dimension gotcha. It omits what happens when x/y are absent and what the call returns, leaving meaningful gaps for a fairly parameterized mutation tool.

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 coverage is 78%, so the schema already documents most parameters, establishing a baseline of 3. The description does add meaning about width/height defaults and why real dimensions matter, but contributes nothing about x/y placement or page/graph selection beyond the schema text.

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?

States a specific verb and resource ("Place an image on a canvas from a URL") and adds the underlying effect ("creates the tldraw asset + image shape"), which clearly separates it from siblings like canvas_add_text or canvas_add_geo. It stops short of naming an alternative, but the URL-based image action is unambiguous.

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?

It gives actionable usage advice for the dimension parameters ("Pass real dimensions when known; the canvas does not measure the file") and the schema notes local files must be uploaded first. There is no explicit when-to-use versus other canvas_add_* tools or statement of prerequisites such as canvas existence.

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