Skip to main content
Glama

Edit Captions Text

edit_captions_text
Destructive

Apply targeted find-and-replace corrections to a Wistia media transcript in a specified language, preserving word timings and saving all edits atomically.

Instructions

Applies targeted find-and-replace corrections to a media's transcript for the specified language, preserving the timings of unchanged words. The whole batch is applied atomically against a specific caption version, or nothing is.

Requires api token with one of the following permissions

Read, update & delete anything

Tokens with the "Act with a team member's permissions" permission (all:delegate_to_contact_permissions scope) can also be used. Requests made with such a token are authorized using the permissions of the contact assigned to the token. Requires confirm=true for the requested mutation. May share access, notify people or incur provider charges.

Input Schema

NameRequiredDescriptionDefault
editsNo
accountNoNamed private Wistia account; selects credentials, not a remote account ID.
confirmNoSet true only when the user asked for exactly this action.
payloadNoComplete JSON request body instead of body flags. Supports current nested customization, caption and nullable values.
payload_fileNoRegular local JSON body file, at most 5 MB. Cannot be mixed with body flags or payload.
language_codeYesThe 3-character ISO 639-2 language code of the caption track to edit (e.g., `eng`, `fra`, `spa`). Some languages use extended IETF subtags (e.g., `zh-Hant`).
media_hashed_idYesThe hashed ID of the media whose transcript should be edited.
expected_versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed20 schema fields changedv3.0.0
    • addedInput schema / $defs
      Added value: +{
      +  "edits": {
      +    "description": "The corrections to apply, all-or-nothing, in one new version.",
      +    "items": {
      +      "properties": {
      +        "end_ms": {
      +          "description": "Optional upper bound (inclusive) restricting the match to a time window. Must be sent with start_ms.",
      +          "type": "integer"
      +        },
      +        "replacement_text": {
      +          "description": "The text to substitute for the target. Use an empty string to delete the target.",
      +          "type": "string"
      +        },
      +        "start_ms": {
      +          "description": "Optional lower bound (inclusive, in the requested media's coordinate space) restricting the match to a time window. Must be sent with end_ms.",
      +          "type": "integer"
      +        },
      +        "target_text": {
      +          "description": "The exact transcript text to replace. Matched exactly after normalization (case, punctuation, and whitespace are ignored). Fuzzy matches are never applied — they are only returned as suggestions.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "target_text",
      +        "replacement_text"
      +      ],
      +      "type": "object",
      +      "unevaluatedProperties": false
      +    },
      +    "maxItems": 20,
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  "expected_version": {
      +    "description": "The active caption version returned with the caption content used to prepare these edits. The edit applies only if that is still the active version; otherwise it returns 409 so you re-read and retry.",
      +    "type": "integer"
      +  }
      +}
    • changedInput schema / properties / confirm / description
      Previous value: -"Must be true for the specific user-requested write."New value: +"Set true only when the user asked for exactly this action."
    • addedInput schema / properties / edits / $ref
      Added value: +"#/$defs/edits"
    • removedInput schema / properties / edits / description
      Removed value: -"The corrections to apply, all-or-nothing, in one new version."
    • removedInput schema / properties / edits / items
      Removed value: -{
      -  "properties": {
      -    "end_ms": {
      -      "description": "Optional upper bound (inclusive) restricting the match to a time window. Must be sent with start_ms.",
      -      "type": "integer"
      -    },
      -    "replacement_text": {
      -      "description": "The text to substitute for the target. Use an empty string to delete the target.",
      -      "type": "string"
      -    },
      -    "start_ms": {
      -      "description": "Optional lower bound (inclusive, in the requested media's coordinate space) restricting the match to a time window. Must be sent with end_ms.",
      -      "type": "integer"
      -    },
      -    "target_text": {
      -      "description": "The exact transcript text to replace. Matched exactly after normalization (case, punctuation, and whitespace are ignored). Fuzzy matches are never applied — they are only returned as suggestions.",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "target_text",
      -    "replacement_text"
      -  ],
      -  "type": "object",
      -  "unevaluatedProperties": false
      -}
    • removedInput schema / properties / edits / maxItems
      Removed value: -20
    • removedInput schema / properties / edits / minItems
      Removed value: -1
    • removedInput schema / properties / edits / type
      Removed value: -"array"
    • addedInput schema / properties / expected_version / $ref
      Added value: +"#/$defs/expected_version"
    • removedInput schema / properties / expected_version / description
      Removed value: -"The active caption version returned with the caption content used to prepare these edits. The edit applies only if that is still the active version; otherwise it returns 409 so you re-read and retry."
    • removedInput schema / properties / expected_version / type
      Removed value: -"integer"
    • addedInput schema / properties / payload / properties / edits / $ref
      Added value: +"#/$defs/edits"
    • removedInput schema / properties / payload / properties / edits / description
      Removed value: -"The corrections to apply, all-or-nothing, in one new version."
    • removedInput schema / properties / payload / properties / edits / items
      Removed value: -{
      -  "properties": {
      -    "end_ms": {
      -      "description": "Optional upper bound (inclusive) restricting the match to a time window. Must be sent with start_ms.",
      -      "type": "integer"
      -    },
      -    "replacement_text": {
      -      "description": "The text to substitute for the target. Use an empty string to delete the target.",
      -      "type": "string"
      -    },
      -    "start_ms": {
      -      "description": "Optional lower bound (inclusive, in the requested media's coordinate space) restricting the match to a time window. Must be sent with end_ms.",
      -      "type": "integer"
      -    },
      -    "target_text": {
      -      "description": "The exact transcript text to replace. Matched exactly after normalization (case, punctuation, and whitespace are ignored). Fuzzy matches are never applied — they are only returned as suggestions.",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "target_text",
      -    "replacement_text"
      -  ],
      -  "type": "object",
      -  "unevaluatedProperties": false
      -}
    • removedInput schema / properties / payload / properties / edits / maxItems
      Removed value: -20
    • removedInput schema / properties / payload / properties / edits / minItems
      Removed value: -1
    • removedInput schema / properties / payload / properties / edits / type
      Removed value: -"array"
    • addedInput schema / properties / payload / properties / expected_version / $ref
      Added value: +"#/$defs/expected_version"
    • removedInput schema / properties / payload / properties / expected_version / description
      Removed value: -"The active caption version returned with the caption content used to prepare these edits. The edit applies only if that is still the active version; otherwise it returns 409 so you re-read and retry."
    • removedInput schema / properties / payload / properties / expected_version / type
      Removed value: -"integer"
  2. First observedv2.0.0

TDQS

A4/5.0
Behavior5/5

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

Annotations cover the safety profile (destructive=true, idempotent=false, openWorld=true), and the description goes well beyond them: all-or-nothing atomicity, optimistic-concurrency behavior with a 409 on stale expected_version, the confirm=true requirement, the permission/token-delegation rules, and side effects (sharing, notifications, provider charges).

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 core operation is front-loaded in one dense sentence, followed by clearly sectioned auth and mutation caveats. The permissions block is somewhat boilerplate but earns its place for a write operation with delegated-token nuances.

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 destructive, nested-payload, no-output-schema tool, the description supplies the missing pieces: atomicity, version conflict handling (409), confirm requirement, and auth scope. An agent has everything needed to call it correctly.

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 75%, so most parameters are already documented in the schema (edits normalization rules, expected_version conflict behavior, language_code format, payload_file limits). The description reinforces the semantics of edits (timing preservation, exact-vs-fuzzy matching) but adds little beyond what the schema text already provides, so the baseline 3 is right.

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 first sentence gives a specific verb and resource ('find-and-replace corrections to a media's transcript for the specified language') plus a distinguishing scope detail ('preserving the timings of unchanged words'). It never names the sibling it competes with (update_captions, find_caption_matches), so an agent must 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 Guidelines3/5

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

It states prerequisites (confirm=true, required token permission) and constraints (atomic batch against a specific version), which implies 'use this for surgical fixes.' It never says when to prefer this over update_captions or find_caption_matches, and gives no explicit when-not guidance.

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

Deploy Server

Other Tools