Skip to main content
Glama

sam2_segment_image

Generate a PNG mask for a single image by providing point coordinates and labels. Use this tool to isolate objects or regions for compositing or replacement tasks.

Instructions

SAM2: PNG mask for a single image, via the video predictor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blurNo
inputYes
labelsNo
outputYes
pointsYes
erosionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2/5.0
Behavior2/5

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

No annotations are provided, so the description alone must disclose behavior. It mentions the output format (PNG mask) and the underlying method (video predictor), but does not state whether the operation is destructive, what files are created or modified, or any side effects. Critical behavioral context is missing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence, which is concise but severely under-specified. It front-loads the purpose but omits almost all details needed for correct invocation. Conciseness without substance fails the requirement of being appropriately sized for the tool's complexity.

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

Completeness1/5

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

Given six parameters, no output schema, and no annotations, the description is grossly incomplete. It does not explain how to provide input, what points and labels mean, how output is handled, or any constraints. An agent has almost no chance of using this tool correctly based solely on the description.

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

Parameters1/5

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

Schema description coverage is 0% and the description provides no information about any of the six parameters (blur, input, labels, output, points, erosion). The agent cannot infer the meaning or format of these fields from the tool description, relying solely on the schema's bare names and types.

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

Purpose3/5

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

The description states the tool's purpose: it produces a PNG mask for a single image using SAM2 via the video predictor. This indicates the action and resource, and hints at a distinction from video-based siblings. However, it does not explain the role of points, labels, or other parameters, leaving the exact operation vague.

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?

The description implies use for a single image (as opposed to video), which weakly differentiates it from sam2_segment_video. There is no explicit guidance on when to choose this tool over other SAM2 siblings like sam2_object_track or sam2_refine_mask, nor any conditions or prerequisites.

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