Skip to main content
Glama

Export Canvas as PNG

javafx_export_image
DestructiveIdempotent

Export the active JavaFX off-screen canvas to a PNG image file in an allowed directory.

Instructions

Export the active off-screen canvas to a PNG image 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": {
      "path": "<path>"
    },
    "name": "javafx_export_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesOutput PNG path inside an allowed directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

C2.9/5.0
Behavior2/5

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

Annotations declare destructiveHint=true and idempotentHint=true, but the description reads like a harmless read-out ("Export") and never warns that an existing file at the target path may be overwritten or that content is destroyed. It also omits the implicit state requirement that an active canvas must exist, which is the main failure mode.

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 with zero padding, front-loading the action and the resource. Nothing in it is redundant or wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive file-writing tool with no output schema and no annotations explaining overwrite or state preconditions, the description should state that a canvas must be initialized and that an existing file may be replaced. Neither is present, so the agent lacks the information needed to call it safely.

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 100% and the single path parameter is documented in the schema as an "Output PNG path inside an allowed directory." The description adds nothing about path constraints, extension handling, or overwrite behavior, so the baseline of 3 applies for a fully-described single parameter.

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?

Specific verb ("Export") plus a specific resource ("active off-screen canvas") and output format (PNG image file), which separates it from sibling canvas tools like javafx_draw_canvas or javafx_clear_canvas that mutate the canvas rather than persist it. It does not explicitly name a sibling alternative, so it falls short of a 5.

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 when-to-use guidance at all: nothing tells the agent this requires an already-initialized canvas with drawn content, or when to prefer it over other canvas operations. There are no stated prerequisites or exclusions, leaving the agent to infer the preconditions.

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