Skip to main content
Glama

sam2_screen_replace

Replace a screen in video with a replacement image by specifying points and mask; uses homography to align perspective.

Instructions

SAM2: screen replacement, by mask plus a homography onto the oriented rectangle. Output is muted; perspective is approximate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blurNo
inputYes
labelsNo
outputYes
pointsYes
erosionNo
replacementYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden and does disclose two useful traits: 'Output is muted' and 'perspective is approximate.' However, it does not mention side effects, file requirements, whether the operation is destructive, or what the tool returns, leaving meaningful behavioral gaps.

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?

The description is a single terse sentence with no filler: it front-loads purpose, then technique, then output quality. It is appropriately sized for a compact definition, though its brevity crosses into under-specification.

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?

This is a complex tool with seven parameters, no output schema, no annotations, and no schema descriptions, yet the description provides only a high-level algorithm and a quality caveat. It is not complete enough for an agent to determine how to populate the required parameters or what to expect as a result.

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%, so the description must compensate for all seven parameters, but it explains none of them. The phrase 'by mask plus a homography' hints at the algorithm but does not map to specific fields like points, labels, replacement, blur, or erosion, nor does it clarify their formats or relationships.

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 identifies a specific operation—screen replacement using a mask and homography onto an oriented rectangle—and the technique distinguishes it from the many sam2_* siblings focused on segmentation, tracking, and inpainting. It is not a tautology and gives a clear sense of what the tool does, though some jargon like 'oriented rectangle' could be more concrete.

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 guidance is given about when to choose this tool over alternatives such as sam2_refine_mask, sam2_video_inpaint, or sam2_propagate_mask. The description states no use cases, prerequisites, or exclusions, so an agent must infer appropriateness from the name and context.

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