Skip to main content
Glama

set_audio_and_subtitle

Switch the audio track and/or subtitle of the video now playing on the target instance. "audio" is a stream index; "subtitle" is a stream index or "off" to hide subtitles — use the "index" values from audio_and_subtitle_info.

Instructions

Switch the audio track and/or subtitle of the video now playing on the target instance. "audio" is a stream index; "subtitle" is a stream index or "off" to hide subtitles — use the "index" values from audio_and_subtitle_info. Omit an argument to leave that stream unchanged; give at least one. Returns the player-state snapshot.

Input Schema

NameRequiredDescriptionDefault
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

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose useful behavior: the tool returns a player-state snapshot, "off" differs from omitting the argument, and at least one argument is required. It does not state that this is a live mutation, that something must be playing, or how errors surface — meaningful gaps for an unannotated mutation tool.

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?

One dense but tightly ordered paragraph: action, then parameter semantics, then the omit/require rule, then the return. No sentence is wasted.

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

Completeness4/5

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

An output schema exists, so the brief note about returning a player-state snapshot is sufficient. The main missing piece is the precondition that a video must be playing and how failures are reported, which matters for a three-parameter live-mutation tool.

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 baseline is 3, but the description adds real meaning: it ties both indices to audio_and_subtitle_info, explains the `off` string, and introduces the 'give at least one' constraint that the schema does not express (0 required parameters).

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+resource: switching the audio track and/or subtitle of the video currently playing on a target instance. It reads clearly against siblings like audio_and_subtitle_info (which supplies the indices) and playfile_with_audio_and_subtitle (which sets streams at playback start), though neither sibling is named.

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?

It supplies the operative prerequisite — use the `index` values from audio_and_subtitle_info — and states the argument rules (omit to leave unchanged, give at least one). There is no explicit when-not or named alternative for setting streams at playback time, so it stops short of the top mark.

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