Skip to main content
Glama

Cut out a person or a subject

cutout_subject

Cut a person, or any subject you name, out of a ready video or image as a soft matte: white where the subject is, solid inside, with its hair and motion blur soft, and black elsewhere. Returns the matte's Asset ID: bind it with mask= in patch_film. How it works: the subject is found and tracked on every frame, then matted from one frame where all of it is in the picture, forward to the end of the range and backward to its start; every frame where the subject is not in the picture is black. So, before you call it, look at the footage with preview_frame or read_asset and pass at, a source second where all of the subject is in the picture and nothing covers it (null lets it pick one). For a video, pass startTime and endTime with only the source range where the subject is on screen, from when it comes in to when it leaves, inside the shots you build: only that range is cut out, at no extra credits: it is part of the message a minute of it, billed by the second. The matte is black before startTime and ends at endTime, so mask= lines up with the footage's source time as it is. null for both cuts out the whole video. An image takes null for startTime, endTime and at.

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": {
      "assetId": "<assetId>",
      "startTime": "<startTime>",
      "endTime": "<endTime>",
      "subject": "<subject>",
      "at": "<at>",
      "clipId": "<clipId>",
      "atSpace": "<atSpace>",
      "projectId": "<projectId>"
    },
    "name": "cutout_subject"
  }
}

Input Schema

NameRequiredDescriptionDefault
atYesA source second where all of the subject is in the picture and nothing covers it, which you checked with preview_frame or read_asset. null picks such a frame itself. An image takes null.
clipIdYesThe film clip that plays this asset, when space or atSpace needs one and several clips play it. null picks the clip that shows the asset at that time.
assetIdYes
atSpaceYesWhat this call's times are. null or source: seconds into the asset file. timeline: seconds of the film, read through the clip that plays the asset then (clipId to pick one).
endTimeYesSource second to stop reading at, or null for the asset's end. null for both reads the whole asset.
subjectYesWhat to find, in a few words: "person", "the dog", "the red car", "the woman in the red coat". null is a person. Everything the words fit is found, so name what sets one apart to get one. Name one kind of thing: words that join two ("the man and the microphone") find neither.
projectIdYesThe project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs.
startTimeYesSource second to start reading at, or null for the asset's start. Pass the range of the shot you build.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / subject / description
      Previous value: -"What to find, in a few words: \"person\", \"the dog\", \"the red car\", \"the woman in the red coat\". null is a person. Everything the words fit is found, so name what sets one apart to get one."New value: +"What to find, in a few words: \"person\", \"the dog\", \"the red car\", \"the woman in the red coat\". null is a person. Everything the words fit is found, so name what sets one apart to get one. Name one kind of thing: words that join two (\"the man and the microphone\") find neither."
  2. Changed3 schema fields changed
    • addedInput schema / properties / atSpace
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "source",
      +        "timeline"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "What this call's times are. null or source: seconds into the asset file. timeline: seconds of the film, read through the clip that plays the asset then (clipId to pick one)."
      +}
    • addedInput schema / properties / clipId
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The film clip that plays this asset, when space or atSpace needs one and several clips play it. null picks the clip that shows the asset at that time."
      +}
    • changedInput schema / required
      Previous value: -[
      -  "assetId",
      -  "startTime",
      -  "endTime",
      -  "subject",
      -  "at",
      -  "projectId"
      -]New value: +[
      +  "assetId",
      +  "startTime",
      +  "endTime",
      +  "subject",
      +  "at",
      +  "clipId",
      +  "atSpace",
      +  "projectId"
      +]
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

The description adds substantial behavior beyond the annotations: the matte is white on the subject and black elsewhere, hair and motion blur are soft, tracking works forward and backward from the chosen frame, and frames without the subject are black. It also discloses the return value, binding workflow, billing behavior, and range semantics, which is far richer than the annotations alone.

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 definition is front-loaded with the core action and output, then explains tracking and range prerequisites. It is appropriately detailed for an eight-parameter tool, but the billing phrase is awkward and somewhat redundant, so it is not maximally concise.

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

Completeness5/5

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

For a complex eight-parameter tool with no output schema, the description covers the operation, output, required pre-check, video/image parameter behavior, and mask binding workflow. The remaining structured details are adequately handled by the schema.

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 high at 88%, so the schema already carries most parameter meaning. The description still usefully explains practical selection of at, startTime/endTime as the on-screen source range, subject wording, and image null handling, adding operational meaning beyond the schema.

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?

The description states a specific verb and resource: cutting a person or named subject out of a ready video/image as a soft matte. It also clarifies the output is a matte Asset ID to bind via mask= in patch_film, which distinguishes this operation from the binding step.

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?

It gives clear pre-call guidance to inspect footage with preview_frame or read_asset and choose at where the subject is fully visible. It also specifies video range selection with startTime/endTime and null behavior, though it does not explicitly compare against sibling alternatives such as segment_subject.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.