Skip to main content
Glama

Get Media Context

get_media_context
Read-onlyIdempotent

Fetch bounded authoring context for a media item: dimensions/thumbnail, compact face roster, transcript counts/sample, temporal grids, and fact readiness. Transcript and word-grid counts cover one page only (default 20 utterances); pass transcript.data.pagination.nextCursor as after to get_media_context for the next context page, or use get_transcript for exact paginated word timings.

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": {
      "mediaItemId": "<mediaItemId>"
    },
    "name": "get_media_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterNoZero-based utterance cursor from transcript.data.pagination.nextCursor.
limitNoTranscript utterances per context page (default 20, maximum 100).
projectIdNoRead the item through this project, for media shared into it.
mediaItemIdYesmediaItemId (path).

Output Schema

NameRequiredDescriptionDefault
facesNo
factsNoDerived facts about this source (subject tracks, mattes): what has been computed, its status, and what it was billed. Same shape as GET /media/{id}/facts.
widthNo
heightNo
offersNoEnhancements this source does not have yet, with a server quote. Same shape as GET /media/{id}/facts. Mattes are quoted per-window via POST /media/{id}/matte, never here.
mediaIdNo
beatGridNoThe MUSIC-role rhythm grid (audio-substrate MVP). Present only for a music bed that carries a computed beat grid; null otherwise. For a music-driven film, cut on these beats (transition midpoints on beats, risers resolving on downbeats).
envelopeNoEnvelope evidence (audio-substrate P0). `envelopeClass` is always present when an envelope exists (the SFX pack carries it); the numeric probe stats are present only when an audio probe has run. Null when no envelope is stored.
wordGridNoThe VO-role rhythm grid for this bounded transcript page. Present when a transcript exists; null otherwise. Check pagination.hasMore before treating it as a complete voice spine.
audioRoleNoDECLARED audio role of this asset (audio-substrate P0): 'vo' (narration), 'music' (bed that ducks under speech), 'sfx' (one-shot hit), 'ambience' (a bed that HOLDS under VO — never ducks). Author the clip source's `audioRole` from this. Null for footage/images or an undeclared audio asset.
thumbnailNoPresigned processing thumbnail (~1 week) — the footage at a glance. For stills at chosen timestamps, use preview_frame with a one-clip composition over this media.
transcriptNo
durationSecNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / projectId
      Added value: +{
      +  "description": "Read the item through this project, for media shared into it.",
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / after
      Added value: +{
      +  "description": "Zero-based utterance cursor from transcript.data.pagination.nextCursor.",
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Transcript utterances per context page (default 20, maximum 100).",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / wordGrid / description
      Previous value: -"The VO-role rhythm grid: word onsets surfaced from the transcript (pure exposure). Present only when a transcript exists; null otherwise. For a VO-driven (narration) film, cut every beat boundary to the voice — the film-spine rule."New value: +"The VO-role rhythm grid for this bounded transcript page. Present when a transcript exists; null otherwise. Check pagination.hasMore before treating it as a complete voice spine."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuinely non-obvious behavior the annotations cannot convey: results are page-bounded (default 20 utterances, max 100) and counts/word-grids only cover that single page, which prevents an agent from mistaking partial counts for totals.

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?

Two sentences, front-loaded with what the tool returns before the pagination caveat. The payload enumeration is dense but every item is informative. Slightly overpacked — the pagination and the get_transcript handoff compete in one sentence.

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?

Output schema exists so return-shape explanation is unnecessary; annotations cover safety. The description supplies the two things an agent actually needs and could not infer: data is page-bounded with a default of 20, and how to continue. Nothing required for a correct first call is absent.

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 baseline is 3. The description earns an extra point by documenting the relationship between parameters and output that the schema can't express: `after` must be fed the transcript.data.pagination.nextCursor value, and `limit` governs utterances per context page. `projectId` is left to the schema, which documents it adequately.

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 ('Fetch bounded authoring context') and resource ('a media item'), then enumerates the exact payload: dimensions/thumbnail, face roster, transcript counts/sample, temporal grids, fact readiness. It also names the sibling it should not be confused with, get_transcript, so the agent can disambiguate without opening either schema.

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 an explicit routing rule: use this for bounded context pages, use get_transcript for exact paginated word timings. It also spells out the pagination loop (pass nextCursor as `after`). What's missing is a stated exclusion for get_media_facts, the closest other context-ish sibling, so the boundary there is left implicit.

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.