Skip to main content
Glama

Add Overlay

add_overlay

Registers a custom component as a global overlay that renders above scenes, with optional start/end frames for watermarks or brief animations, and persists through scene edits.

Instructions

Register a custom component as a global overlay that renders on top of scenes. The component file must already exist on disk (use write_file first). Overlays persist across all scene mutations — they survive create_scene, update_scene, delete_scene, and reorder_scenes calls. Omit startFrame/endFrame for full-video-duration overlays (logos, watermarks). Set them for partial-duration overlays (animations that appear briefly).

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": {
      "projectPath": "<projectPath>",
      "overlayId": "<overlayId>",
      "name": "<name>",
      "componentName": "<componentName>",
      "file": "<file>"
    },
    "name": "add_overlay"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesProject-relative path to the component file. Example: "src/overlays/BouncingBall.tsx"
nameYesHuman-readable label, e.g. 'Bouncing Ball'
zIndexNoRender order. Higher = on top. Default 10.
endFrameNoLast frame the overlay appears. Omit for full-video-duration.
overlayIdYesUnique kebab-case ID, e.g. 'overlay-bouncing-ball'
startFrameNoFirst frame the overlay appears. Omit for full-video-duration.
projectPathYes
componentNameYesNamed export in the .tsx file — must match exactly. Example: "BouncingBall"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/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 meaningful work: it discloses that overlays persist across create_scene/update_scene/delete_scene/reorder_scenes, which is non-obvious lifecycle behavior. It omits what happens on duplicate overlayId (overwrite vs error) and what the call returns, which matters for a mutation tool with zero annotation coverage.

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 action, followed by prerequisite and then lifecycle facts; each sentence is short and scannable. The final two sentences partly duplicate schema text, a small redundancy but not damaging.

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 an 8-parameter mutation tool with no annotations and no output schema, the description covers purpose, prerequisite, persistence behavior, and frame-range semantics. Gaps remain around duplicate-ID handling and the return value, but nothing essential for a correct first call is missing.

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 88%, so the schema already documents file, name, overlayId, componentName, zIndex, and the start/end frame semantics. The description mostly restates the frame-omission rule already present in the schema, adding only light use-case framing (logos vs animations). Baseline 3 applies when the schema does the heavy lifting.

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 ('Register a custom component as a global overlay that renders on top of scenes') plus the scope of where it applies. This is clearly separable from scene-mutation siblings like create_scene or update_scene, and from remove_overlay.

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 an explicit prerequisite ('The component file must already exist on disk (use write_file first)') and tells the agent when to supply versus omit startFrame/endFrame, with concrete examples (logos/watermarks vs brief animations). It does not point to remove_overlay or update paths, but the positive guidance is solid.

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