Skip to main content
Glama

capture_som

Capture a window with numbered marks on interactive controls so agents can act by mark number or exact screen rectangle instead of guessing pixels.

Instructions

Capture a window with numbered marks on every interactive element.

This is the tool to use when you need to understand *where* things are, not
just *what* they are. The accessibility tree decides the boxes, so marks are
pixel-exact and never hallucinated, and every mark in the legend carries a
real screen rect.

Prefer this over capture_window when you plan to act on the result: answer
with a mark number, or use the rect directly and skip vision entirely.

max_marks caps how many controls are numbered (dense toolbars get crowded);
the highest-value controls are kept - named ones first, then larger ones.
max_side downscales the image before drawing, so badges stay sharp.

Falls back to a plain unmarked capture with an explanation when the window
exposes no UI tree (Chromium/Electron without --force-renderer-accessibility).

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": {
      "window": "<window>"
    },
    "name": "capture_som"
  }
}

Input Schema

NameRequiredDescriptionDefault
windowYes
max_sideNo
max_marksNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: it discloses that rects come from the accessibility tree and are pixel-exact, the selection heuristic for which controls survive max_marks, that max_side is applied before drawing, and the important degraded-mode behavior (plain unmarked capture plus an explanation) when no UI tree exists.

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 the core purpose and then organized into differentiation, tuning params, and fallback behavior - each block earns its place. Minor waste in the rhetorical "never hallucinated" phrasing and the where/what framing, but nothing structurally bloated.

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 three-param, no-output-schema tool this is largely complete: it conveys what the returned image contains (marks plus a legend with rects) and the degraded path. The remaining gap is how to obtain a valid window reference and how the mark legend is shaped for consumption.

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?

Schema coverage is 0%, so the description must do the work; it explains max_marks' meaning and its trade-off/selection policy and max_side's downscale-before-draw effect, which the schema's bare titles do not convey. The required "window" parameter is never specified (title vs. id, and that list_windows supplies it), leaving one gap.

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 ("Capture a window") plus the defining artifact (numbered marks on interactive elements). The contrast with capture_window and the pointer to the accessibility tree make it distinguishable from siblings without opening a schema.

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

Usage Guidelines4/5

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

Gives a clear context ("when you need to understand where things are") and an explicit preference rule over capture_window when the result will be acted on. It lacks an explicit when-not to use it (e.g., for purely visual/pixel inspection use capture_window), though the fallback note implicitly covers one case.

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