Skip to main content
Glama

playfile_with_audio_and_subtitle

Play a video file by path AND select its audio track and/or subtitle once it starts — the "when starting playback" partner of set_audio_and_subtitle.

Instructions

Play a video file by path AND select its audio track and/or subtitle once it starts — the "when starting playback" partner of set_audio_and_subtitle. "file" is required; "audio" is a stream index and "subtitle" is a stream index or "off", using the "index" values from audio_and_subtitle_info. Give at least one of audio/subtitle (else use playfile). Video only. Returns the player-state snapshot.

Input Schema

NameRequiredDescriptionDefault
fileYesPath of the video file to play — the `file` field of a `searchmedia` result row, or what `audio_and_subtitle_info` reports. Any path Kodi can reach works, in-library or not.
audioNoAudio stream index to select — an `index` from `audio_and_subtitle_info`. Omit to leave the audio track unchanged.
instanceNoTarget Kodi instance. Omitted uses the default ("(null)").
subtitleNoSubtitle stream index to show — an `index` from `audio_and_subtitle_info` — or "off" to hide subtitles. Omit to leave the subtitle unchanged ("off" is distinct from omitting it).

Output Schema

NameRequiredDescriptionDefault
timeNoPlayback position { hours, minutes, seconds, milliseconds }.
typeNoThe active player kind.
audioNoAudio tracks of the playing video (video only): { count, current: { index, language, codec, channels } }. `index` is the set_audio_and_subtitle audio selector.
stateYesPlayback state; "stopped" means nothing is loaded.
progressNoLegible position derived from time/totaltime, "elapsed / total (NN%)" e.g. "15:38 / 46:40 (33%)"; absent for live streams with no fixed length.
subtitleNoSubtitles of the playing video (video only, present only when any exist): { count, enabled, current: { index, language } }. `current` is present only while a subtitle is shown; `index` is the set_audio_and_subtitle subtitle selector.
totaltimeNoThe item's duration, same shape as time.
nowplayingNoThe loaded media (present whenever something is loaded): { media (song/episode/movie/…; "unknown" off-library), id (library id, -1 off-library), file, label, title; and where they apply showtitle/season/episode (TV), album/artist/track (song) }.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the timing behavior ("once it starts"), the argument constraint, the "Video only" limitation, and that it returns a player-state snapshot. It stops short of covering error behavior or what happens to current playback, but the core behavioral profile is present.

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-loaded with the action, then the constraints and routing in dense em-dash clauses. Every sentence carries information, though the audio/subtitle index wording is slightly repetitive with the schema.

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 4-param tool with full schema coverage and an output schema, the description supplies everything the schema does not: timing, sibling routing, and the required-argument rule. An agent can call it correctly without opening anything else.

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 100%, so the schema already documents every parameter including the "off"-vs-omit distinction. The description reinforces the semantics and cross-references audio_and_subtitle_info for index values, but adds little beyond the schema, matching the baseline.

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+resource+scope: play a video file by path while selecting its audio track and/or subtitle. It explicitly positions itself against siblings, calling itself the "when starting playback" partner of set_audio_and_subtitle and routing to playfile when no track selection is needed.

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?

Gives an explicit usage rule: "Give at least one of audio/subtitle (else use playfile)", and clarifies the timing distinction vs set_audio_and_subtitle. It also states a scope constraint ("Video only"), so an agent knows when not to reach for it.

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