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 about 76 credits 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.

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.3/5.0
Behavior5/5

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

Goes far beyond the annotations: it explains the tracking/matting algorithm (found and tracked per frame, matted from one full-visibility frame forward and backward), that off-picture frames are black, that the matte is black before startTime and ends at endTime, and how the result binds via mask= in patch_film. It also discloses billing, which no annotation covers. This is exactly the mutating, cost-incurring context an agent needs.

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-loads the core outcome (what a matte is and the returned Asset ID) before the mechanics and prerequisites. Three dense paragraphs are justified by the tool's complexity, though a few clauses (e.g. repeated null-handling) could be tightened.

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 an 8-parameter, no-output-schema mutation tool, the description covers the return value, the workflow preconditions, time-range semantics, cost, and downstream usage. An agent has everything needed to invoke it correctly without further documentation.

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?

With 88% schema coverage the baseline is 3, but the description meaningfully extends it: it clarifies that `at` must be a verified full-visibility second, that subject phrases must name one kind of thing (conjunctions find neither), that a video range is cut only inside startTime/endTime while an image takes null, and that nulls mean whole asset. It adds interpretation rather than repeating the schema.

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?

States a specific verb and resource: cut a person or named subject out of a video or image as a soft matte, with the exact output semantics (white = subject, black elsewhere) and the return value (a matte Asset ID). It is very clear about what it produces, but never names the siblings it competes with (remove_background, segment_subject), so an agent must infer the distinction.

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 concrete preconditions and a workflow: look at the footage with preview_frame or read_asset first, then pass `at` at a second where the subject is fully visible, and restrict startTime/endTime to the range where the subject is on screen. The cost guidance (about 76 credits a minute, billed by the second) tells an agent when to be careful, though no explicit alternative tools are compared.

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.