Skip to main content
Glama

Clear Canvas

javafx_clear_canvas
Idempotent

Clear the active off-screen JavaFX canvas to remove previous drawings before rendering new content.

Instructions

Clear the active off-screen canvas.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "javafx_clear_canvas"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.1/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=true, so the description adds only the qualifiers 'active' and 'off-screen'. It does not say what clearing produces (transparent vs. background color), whether draw state or color settings are reset, or that it silently no-ops if no canvas is active.

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 no filler. It is arguably too short rather than too long, but nothing in it is wasted.

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 no parameters and no output schema, the surface area is small, so the main open question is state interaction with the other canvas tools. The description never addresses whether an active canvas is required or what state remains afterward, leaving a real gap for stateful tool use.

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?

The tool takes zero parameters, so the baseline is 4; there is nothing for the description to disambiguate beyond confirming there are no options. It correctly implies the target is implicitly the active canvas rather than an id.

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 ('Clear') and resource ('the active off-screen canvas'), which is enough to distinguish it from draw/init canvas siblings at a glance. It stops short of naming any sibling explicitly, so differentiation relies on inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No indication of when to call this versus javafx_init_canvas or javafx_draw_canvas, and no prerequisites such as whether a canvas must already be initialized or the result exported afterward. The agent must guess the intended ordering in a workflow.

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