Skip to main content
Glama

queue

Queue an item behind the one now playing, for continuous playback: a searchmedia row's library id (type+id) or a file path; next:true plays it right after the current item. Something must already be playing (start with play/playfile).

Instructions

Queue an item behind the one now playing, for continuous playback: a searchmedia row's library id (type+id) or a file path; next:true plays it right after the current item. Something must already be playing (start with play/playfile). An item whose file is missing from disk (stale library entry) is refused. Returns the player-state snapshot, unchanged by the add — the current item keeps playing.

Input Schema

NameRequiredDescriptionDefault
idNoLibrary id of the item to queue — the `songid`/`episodeid`/`movieid` of a `searchmedia` result row, matching `type`. Give exactly one of `id` or `file`.
fileNoPath of the file to queue — the `file` field of a `searchmedia` result row; any path Kodi can reach works. Give exactly one of `id` or `file`.
nextNoWhen true, insert the item right after the one now playing ("play next") instead of appending to the end of the queue.
typeNoKind of library id passed in `id` — picks the item key (songid/episodeid/movieid). Required with `id`; not used with `file`. Must match the playing queue: a song joins audio playback, an episode or movie joins video playback.
instanceNoTarget Kodi instance. Omitted uses the default ("(null)").

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. Changed15 schema fields changed
    • removedOutput schema / properties / album
      Removed value: -{
      -  "description": "Song: the album name.",
      -  "type": "string"
      -}
    • removedOutput schema / properties / artist
      Removed value: -{
      -  "description": "Song: the performers, an array of strings.",
      -  "type": "array"
      -}
    • addedOutput schema / properties / audio
      Added value: +{
      +  "description": "Audio tracks of the playing video (video only): { count, current: { index, language, codec, channels } }. `index` is the set_audio_and_subtitle audio selector.",
      +  "type": "object"
      +}
    • removedOutput schema / properties / episode
      Removed value: -{
      -  "description": "TV episode: episode number.",
      -  "type": "integer"
      -}
    • removedOutput schema / properties / file
      Removed value: -{
      -  "description": "Path of the playing item.",
      -  "type": "string"
      -}
    • removedOutput schema / properties / id
      Removed value: -{
      -  "description": "Library id of the playing item; -1 when off-library.",
      -  "type": "integer"
      -}
    • removedOutput schema / properties / label
      Removed value: -{
      -  "description": "Kodi's display label for the item.",
      -  "type": "string"
      -}
    • removedOutput schema / properties / media
      Removed value: -{
      -  "description": "Real media type (song/episode/movie/musicvideo/…); \"unknown\" for an off-library file.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / nowplaying
      Added value: +{
      +  "description": "The 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) }.",
      +  "type": "object"
      +}
    • addedOutput schema / properties / progress
      Added value: +{
      +  "description": "Legible position derived from time/totaltime, \"elapsed / total (NN%)\" e.g. \"15:38 / 46:40 (33%)\"; absent for live streams with no fixed length.",
      +  "type": "string"
      +}
    • removedOutput schema / properties / season
      Removed value: -{
      -  "description": "TV episode: season number.",
      -  "type": "integer"
      -}
    • removedOutput schema / properties / showtitle
      Removed value: -{
      -  "description": "TV episode: the show's name.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / subtitle
      Added value: +{
      +  "description": "Subtitles 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.",
      +  "type": "object"
      +}
    • removedOutput schema / properties / title
      Removed value: -{
      -  "description": "The item's title (may be empty).",
      -  "type": "string"
      -}
    • removedOutput schema / properties / track
      Removed value: -{
      -  "description": "Song: track number on the album.",
      -  "type": "integer"
      -}
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the prerequisite that playback must be active, the refusal of stale/missing-file entries, and that the return is an unchanged player-state snapshot. These are exactly the behavioral traits an agent needs and none are covered by structured fields.

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 action, then the input forms, constraints, and return value in a compact flow. Dense and slightly packed but nearly every clause earns its place.

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?

Given an output schema exists, the description needn't detail return values, yet it still notes the snapshot behavior. Combined with preconditions and input guidance, 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 coverage is 100%, so the schema already documents all five parameters including the id/file exclusivity and next semantics. The description reinforces the id-vs-file forms and adds the cross-parameter note that type must match the playing queue, but mostly restates schema content, so baseline 3 applies.

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 (queue) and resource (an item behind the one now playing) with the playback scope spelled out. It distinguishes itself from siblings like play/playfile by describing continuous-queue semantics rather than immediate playback.

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 states the precondition ('Something must already be playing (start with play/playfile)') and names the alternative tools to use first. It also explains that the item can come from a searchmedia row, tying it to the sibling that produces inputs.

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