Skip to main content
Glama

Set Canvas Color

javafx_set_color
Idempotent

Set the fill or stroke color for canvas drawing operations using a color name or hex value. Applies the chosen color to subsequent JavaFX draw calls.

Instructions

Set the current fill or stroke color used by canvas drawing operations.

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": {
      "color": "<color>"
    },
    "name": "javafx_set_color"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorYesColor name or hex

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, and readOnlyHint=false, so the mutation/repeatability profile is covered. The description adds little beyond that: it does not say how to select fill versus stroke, whether the setting persists for subsequent draw calls, or what is returned, which is the main missing behavioral fact for a stateful setter.

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?

One short sentence, front-loaded with the verb and the object of the change, with no filler or redundant restatement of the parameters. 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?

For a one-parameter stateful setter with no output schema, the description is adequate but leaves the key question open: whether it sets fill, stroke, or both, and whether the value persists across later draw calls. Given the annotations carry the safety profile, this is the minimum viable level rather than a complete one.

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 the single parameter is documented as "Color name or hex," so the description need not repeat it. The only added meaning is the fill/stroke context, which is ambiguous rather than clarifying because no parameter selects the target.

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 ("Set") and resource ("the current fill or stroke color used by canvas drawing operations"), so an agent knows it configures canvas paint state rather than drawing pixels. It does not distinguish itself from siblings like javafx_draw_canvas or javafx_init_canvas, and the "fill or stroke" phrasing hints at two targets while the schema exposes only one color parameter.

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 is only implied: the phrase "used by canvas drawing operations" suggests this should be called before a draw call, but no explicit when-to-use, when-not-to-use, or ordering guidance is given. No alternative tool is named even though javafx_draw_canvas and javafx_clear_canvas exist in the same family.

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