Skip to main content
Glama

Index a video

index_video

Index a Library video so search_video_moments can search it, or index one range of it again with shorter segments. mediaId is the video's Asset ID from search_assets or its Library id. startSeconds and endSeconds null index the whole video: new uploads are indexed automatically unless disabled in global settings, so do that only for an older, disabled or failed video. Segment length follows the indexed length: 2 seconds for up to a minute, growing to 6 seconds at three minutes and longer. Index a range of at least 4 seconds when a search moment is too coarse for the question: take that moment's startSeconds and endSeconds, a few seconds wider on each side. A range that rows already cover at least as densely returns the existing job without a charge. Uses no extra credits: it is part of the message of indexed video, billed by the second; an accepted submission keeps its credits even if it later fails or is deleted. It never prevents editing. Returns a job; wait for it with read_video_intelligence and its jobId before searching.

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": {
      "mediaId": "<mediaId>",
      "startSeconds": "<startSeconds>",
      "endSeconds": "<endSeconds>",
      "projectId": "<projectId>"
    },
    "name": "index_video"
  }
}

Input Schema

NameRequiredDescriptionDefault
mediaIdYesThe video: its Asset ID from search_assets, or its Library id (libraryId from search_assets or read_asset, id from search_library).
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.
endSecondsYesSource seconds where the indexed range ends, at least 4 seconds after startSeconds. null with startSeconds null indexes the whole video.
startSecondsYesSource seconds where the indexed range starts. null with endSeconds null indexes the whole video.

Output Schema

NameRequiredDescriptionDefault
kindYes
noteYes
jobIdYes
stateYes
reasonYes
resultYes
canWaitYes
mediaIdYes
errorCodeYes
updatedAtYes
endSecondsYes
startSecondsYes
pollAfterSecondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / updatedAt / anyOf
      Previous value: -[
      -  {
      -    "format": "date-time",
      -    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "format": "date-time",
      +    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed2 schema fields changed
    • addedInput schema / properties / projectId
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The 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."
      +}
    • changedInput schema / required
      Previous value: -[
      -  "mediaId",
      -  "startSeconds",
      -  "endSeconds"
      -]New value: +[
      +  "mediaId",
      +  "startSeconds",
      +  "endSeconds",
      +  "projectId"
      +]
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Goes well past the annotations by disclosing billing mechanics (billed by the second, no extra credits, an accepted submission keeps its credits even if it later fails or is deleted), that a covered range returns an existing job without charge, and that indexing never blocks editing. It also names the follow-up step (read_video_intelligence with jobId). It does not state permission or scope prerequisites for indexing, but the cost/credit and job-lifecycle details are the material risks for a write operation and they are covered.

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 purpose and the range mode, and nearly every sentence carries operational value (auto-indexing caveat, widening heuristic, credit behavior, job chaining). It is dense and repeats the schema's null/whole-video rule, which costs a little economy but not comprehension.

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 billed, asynchronous indexing tool, the description covers the trigger conditions, the range-selection heuristic, cost behavior, the returned job, and the exact next tool to call. With an output schema present, return format need not be explained, so nothing an agent needs to invoke and follow up correctly is missing.

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 100%, so the schema already defines every parameter; the description still adds real meaning by tying segment length to indexed length (2s up to a minute, growing to 6s at three minutes and longer) and by explaining how to derive startSeconds/endSeconds from a search moment. Only the null-indexes-whole-video behavior is restated from 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?

States a specific verb and resource plus the downstream purpose: 'Index a Library video so search_video_moments can search it,' and adds a second mode ('index one range of it again with shorter segments'). An agent can immediately distinguish this from search_video_moments, edit_video, or read_video_intelligence.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicitly separates the two modes and gives the condition that selects each: whole-video indexing only for 'an older, disabled or failed video' because new uploads are auto-indexed, and range re-indexing 'when a search moment is too coarse for the question,' with concrete instructions to widen the moment's boundaries by a few seconds. It also tells the agent what happens when the range is already covered (existing job, no charge).

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.