Skip to main content
Glama

Select part of a photo

photo_select

Find part of the photo so an adjustment applies only there: kind "subject" (the main subject), "background" (everything but it), "sky", or "object" with points [{x, y, label: 1 (this) or 0 (not this)}] and/or a box {x, y, w, h} around it, all fractions of the photo as it is drawn after its crop, straighten and turn (as photo_look shows it). A segmentation model on our own server picks the pixels of the photo's preview copy; it never makes any. refine (default true) runs edge-aware guided and luminance alpha matting so fine pine needles, branches and hair produce clean fractional alpha mattes with zero color halo when graded; feather (0 to 0.05 of the long side) softens it; name names it. The reply gives the selection's id, how much of the picture it covers, and a look of it (the photo darkened outside it). Then use it as a mask in photo_edit: {add: {op: "exposure", ev: 0.3, name: "lift-subject", mask: {select: {id}}}}, or {select: {id}, invert: true} for everything but it. A subject takes about 15 s, a point or box a few seconds, the sky under a second. Counts against your user's smart selections a month. Needs the photo engine: without it, use shapes or a range mask. Change the crop, straighten or turn afterwards and the selection no longer lines up: select again.

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": {
      "kind": "<kind>"
    },
    "name": "photo_select"
  }
}

Input Schema

NameRequiredDescriptionDefault
boxNo
kindYes
nameNo
canvasNo
pointsNo
refineNo
featherNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations: discloses that a server-side segmentation model works on a preview copy and never generates a photo, that refine defaults to true with guided/luminance matting, per-kind latency (15 s subject, sub-second sky), monthly smart-selection quota consumption, and the dependency on the photo engine. The annotations are modest (readOnlyHint=false only), so the description carries the load well; the main omission is any note on failure or partial-selection 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?

Front-loaded with purpose and kinds, then behavior, then usage, then cost and constraints — a sensible ordering. It is dense and somewhat run-on (the matting sentence packs several clauses), but nearly every sentence carries operational information rather than filler.

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

Completeness4/5

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

For a 7-parameter tool with nested objects and no output schema, the description covers the returned values (selection id, coverage fraction, a look with the photo darkened outside) and the main caveats. Only the canvas parameter and error cases are left unaddressed, which is a small residual gap rather than a blocker.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so this text must do all the work and largely does: it explains kind values semantically, decodes points with the label 1/0 meaning, the box shape, the refine default, the feather range as a fraction of the long side, and crucially that all coordinates are fractions of the photo as drawn after crop/straighten/turn. Only the canvas parameter goes unmentioned, a minor gap against six well-covered parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Find part of the photo") plus the purpose ("so an adjustment applies only there"), then enumerates the four selection kinds with their exact enum values. An agent can distinguish this from photo_edit, photo_look, or shape/range masking without opening the schema.

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

Usage Guidelines5/5

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

Gives explicit downstream usage with a concrete payload example (mask in photo_edit, plus the invert variant), and explicitly names the fallbacks when the capability is unavailable: "without it, use shapes or a range mask." It also warns to reselect after crop/straighten/turn changes, which is a genuine when-not-to-reuse rule.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.