Skip to main content
Glama

Overlay Image or Video

overlay
Destructive

Composite an image or video onto a base video at a pixel position, optionally scale it and limit display time, while keeping the base audio and duration.

Instructions

Composite an image or video (logo, watermark, picture-in-picture) onto a video at a pixel position, optionally scaled and time-limited; keeps the base's audio and length.

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": {
      "input": "<input>",
      "overlay": "<overlay>",
      "x": "<x>",
      "y": "<y>"
    },
    "name": "overlay"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYesLeft, px.
yYesTop, px.
endNoHide after this second.
inputYesPath to the base video.
shapeNocircle: centre square masked round (webcam).
startNoShow from this second.
widthNoScale to this width (other side keeps aspect).
heightNoScale to this height.
outputNoOptional output path. Defaults under SCREENCAST_HOME/edits.
overlayYesOverlay image or video path.
overwriteNoAllow replacing an existing file at the output path (default false).

Output Schema

NameRequiredDescriptionDefault
outputPathYesPath of the file written.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.47.0
    • changedInput schema / properties / end / description
      Previous value: -"Optional second to hide the overlay after."New value: +"Hide after this second."
    • changedInput schema / properties / height / description
      Previous value: -"Optional overlay height in px (width auto when omitted)."New value: +"Scale to this height."
    • changedInput schema / properties / overlay / description
      Previous value: -"Path to the overlay image or video (logo, watermark, picture-in-picture)."New value: +"Overlay image or video path."
    • addedInput schema / properties / shape
      Added value: +{
      +  "description": "circle: centre square masked round (webcam).",
      +  "enum": [
      +    "rect",
      +    "circle"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / start / description
      Previous value: -"Optional second to show the overlay from."New value: +"Show from this second."
    • changedInput schema / properties / width / description
      Previous value: -"Optional overlay width in px (height auto when omitted)."New value: +"Scale to this width (other side keeps aspect)."
    • changedInput schema / properties / x / description
      Previous value: -"Overlay left position in pixels."New value: +"Left, px."
    • changedInput schema / properties / y / description
      Previous value: -"Overlay top position in pixels."New value: +"Top, px."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "outputPath": {
      +      "description": "Path of the file written.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "outputPath"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.32.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and readOnlyHint=false, so the write/irreversibility profile is covered. The description adds genuinely new behavioral facts: the base's audio and length are preserved and the overlay can be scaled and time-limited, which an agent could not infer from annotations or schema. It stops short of stating that a new output file is produced rather than the input being modified in place.

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

Conciseness5/5

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

A single front-loaded sentence packs the verb, the two media roles, the placement, and the preservation guarantee with no filler. The semicolon clause is the one piece of information an agent most needs after the action itself, so nothing needs reordering.

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?

With an output schema present, return values need no explanation, and annotations carry the destructive/non-idempotent profile. The description covers the key semantic guarantee (audio and duration preserved). The only gap is not clarifying that results land at a new output path by default versus mutating the input, though the schema's output/overwrite parameters hint at it.

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 description coverage is 100% across all 11 parameters, so the schema already documents x/y as pixel offsets, start/end as time bounds, and width/height as scale factors. The description only echoes those concepts at a high level ('pixel position, optionally scaled and time-limited') without adding format or edge-case detail. Baseline 3 is appropriate.

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?

Names a specific verb ('Composite') and resources ('image or video ... onto a video') and clarifies intent with concrete parenthetical examples (logo, watermark, picture-in-picture). It implicitly separates itself from overlay-adjacent siblings like keystroke_overlay or callout by restricting input to an arbitrary image/video file, but it never explicitly names or contrasts those siblings.

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

Usage Guidelines3/5

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

The examples (logo, watermark, picture-in-picture) imply when to reach for this tool, but there is no explicit when-not guidance, no mention of prerequisites (e.g., need a base video already), and no routing to alternatives such as keystroke_overlay, title_card, or backdrop for other overlay types. Usage is only inferable.

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