Skip to main content
Glama

Get selection

gimp_get_selection
Read-only

Checks whether an image has an active selection, returns its bounds, and optionally tests whether a specified point lies inside the selection.

Instructions

Whether the image has a selection, its bounds, and optionally whether a point is selected.

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": {
      "image": "<image>"
    },
    "name": "gimp_get_selection"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageYesImage id from gimp_status, e.g. 'image:1@a1b2c3d4'.
probe_xNo
probe_yNo

Output Schema

NameRequiredDescriptionDefault
emptyYes
imageYes
boundsYesBounding box of the selection, clipped to the canvas; null when empty.
containsNoWhether (probe_x, probe_y) is selected (> 50%), when a probe point was given.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered without the description's help. The description adds that the call answers three distinct questions, which is mildly useful behavior context, but says nothing about what bounds look like when no selection exists or what happens if only one probe coordinate is supplied.

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?

One front-loaded sentence with no filler; the core question (does a selection exist, and where) comes first and the optional probe behavior follows. It is dense enough that the probe clause reads slightly ambiguously, but nothing 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?

Because an output schema exists, the description needn't spell out return values, and it doesn't. The remaining gap is the probe parameters and the relationship to the selection-mutating siblings, which for a 3-parameter query tool in a large sibling set leaves the definition only minimally sufficient.

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 only 33%: 'image' is documented in the schema, while probe_x and probe_y are undocumented there. The phrase 'optionally whether a point is selected' hints that the probes form an (x, y) point, but it never states they must be provided together or in which coordinate space, so compensation is partial at best.

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 names the resource and the three things returned: selection existence, bounds, and an optional point test. That is a specific query purpose an agent can grasp immediately, though it never contrasts itself with siblings like gimp_select_rectangle or gimp_modify_selection.

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?

There is no when-to-use or when-not-to-use guidance at all. It doesn't say to call this before gimp_modify_selection or after gimp_select_rectangle, and it names no alternatives, so the agent must infer the call context from the tool name alone.

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