Skip to main content
Glama

Crop Video

crop
Destructive

Extract a pixel rectangle from a video and reject coordinates that run off the frame; set x, y, width, and height to define the visible region.

Instructions

Crop a video to a pixel rectangle; one running off the frame is rejected.

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>",
      "x": "<x>",
      "y": "<y>",
      "width": "<width>",
      "height": "<height>"
    },
    "name": "crop"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYes
yYes
inputYesPath to the source video.
widthYes
heightYes
outputNoOptional output path. Defaults under SCREENCAST_HOME/edits.
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. Changed5 schema fields changedv0.47.0
    • removedInput schema / properties / height / description
      Removed value: -"Crop height in pixels."
    • removedInput schema / properties / width / description
      Removed value: -"Crop width in pixels."
    • removedInput schema / properties / x / description
      Removed value: -"Left edge of the crop in pixels."
    • removedInput schema / properties / y / description
      Removed value: -"Top edge of the crop in pixels."
    • 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

B3/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the safety profile is covered structurally. The description adds one genuinely useful behavioral fact: out-of-frame rectangles are rejected rather than clamped. It says nothing about what is destroyed (e.g. overwriting an existing output) or about defaults, so it only partly extends the annotations.

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 with the operation first and the constraint second; no filler and nothing buried.

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

Completeness2/5

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

For a destructive, non-idempotent mutation with 7 parameters, 43% schema coverage, and an output path default under SCREENCAST_HOME/edits, the description omits coordinate-origin semantics and overwrite behavior. An output schema exists, so return values need no explanation, but the input-side gaps are material.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 43%, so the description needs to compensate, yet it says nothing about x/y being the rectangle origin, whether that origin is top-left, or how width/height interact with odd dimensions. The phrase 'pixel rectangle' only weakly signals that the four required integers are pixel units.

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 gives a specific verb (crop) and resource (video) plus the unit of the operation (a pixel rectangle), which clearly separates it from generic transforms. It does not name or contrast with adjacent siblings such as reframe, scale, or trim, so an agent must still infer the boundary itself.

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?

There is no statement of when to choose crop over reframe, scale, or trim, and no prerequisites or side conditions are mentioned. The only extra clause ('one running off the frame is rejected') is a validation rule, not usage guidance.

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