Skip to main content
Glama

Draw on Canvas

javafx_draw_canvas

Draws rectangles, circles, lines, and text onto the active off-screen canvas using coordinates, colors, and dimensions to render JavaFX graphics.

Instructions

Draw shapes and primitives onto the active off-screen canvas.

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": {
      "shape": "<shape>",
      "x": "<x>",
      "y": "<y>"
    },
    "name": "javafx_draw_canvas"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYesX coordinate
yYesY coordinate
x2NoLine end X coordinate
y2NoLine end Y coordinate
textNoText content
colorNoColor name or hex
shapeYesShape: rectangle, circle, line, text
widthNoWidth (default: 50)
heightNoHeight (default: 50)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare this as a non-read-only, non-destructive, non-idempotent mutation of an off-screen surface, so the safety profile is covered. The description adds the useful context that drawing targets an off-screen (not on-screen) buffer, implying repeated calls accumulate rather than render, but it omits what happens when no canvas is active and gives no error 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?

A single front-loaded sentence with zero filler and the target surface stated up front. It is efficient, though its brevity leaves the definition thinner than a 9-parameter drawing tool warrants.

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 9-parameter mutation tool with no output schema, the description covers only the action and the target surface. It should also mention the canvas-initialization prerequisite (javafx_init_canvas), that results are only visible after export, and that drawing is cumulative — all of which an agent needs to invoke it correctly.

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% and every parameter carries its own description, so the schema does the heavy lifting. The description contributes nothing beyond it — it does not explain the shape value set, how text interacts with x/y, or that width/height have defaults.

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 uses a specific verb ('Draw') and resource ('shapes and primitives') and scopes the target as the 'active off-screen canvas', which distinguishes it from a screen-rendering tool. It does not name any sibling (javafx_clear_canvas, javafx_set_color, javafx_export_image), so the agent must infer differentiation from names alone.

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?

The phrase 'active off-screen canvas' implies a prior initialization step and implies that color/shape state may be set elsewhere, but the description never states prerequisites explicitly. There is no when-to-use/when-not guidance and no pointer to alternatives such as clearing the canvas or exporting the result.

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