Skip to main content
Glama

queue

Queue an item behind the one now playing for continuous playback. Accepts library id or file path, with option to play next.

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

TableJSON Schema
NameRequiredDescriptionDefault
instanceNoTarget Kodi instance. Omitted uses the default ("(null)").
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.
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYesPlayback state; "stopped" means nothing is loaded.
typeNoThe active player kind.
mediaNoReal media type (song/episode/movie/musicvideo/…); "unknown" for an off-library file.
idNoLibrary id of the playing item; -1 when off-library.
fileNoPath of the playing item.
labelNoKodi's display label for the item.
titleNoThe item's title (may be empty).
showtitleNoTV episode: the show's name.
seasonNoTV episode: season number.
episodeNoTV episode: episode number.
albumNoSong: the album name.
artistNoSong: the performers, an array of strings.
trackNoSong: track number on the album.
timeNoPlayback position { hours, minutes, seconds, milliseconds }.
totaltimeNoThe item's duration, same shape as time.
Behavior5/5

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

With no annotations provided, the description fully carries the burden of behavioral disclosure. It clearly states that items whose files are missing from disk are refused, that the current item keeps playing (unchanged), and that the return value is a player-state snapshot. This covers safety, side effects, and return behavior comprehensively.

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?

The description is concise with two sentences, front-loading the primary purpose and key constraints. Every sentence adds critical information without redundancy or filler.

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 the presence of an output schema, the description appropriately avoids detailing return values. It covers prerequisites, input modes (library id vs. file), conditions for 'type', and the nuance of 'next'. The parameter descriptions in the schema are thorough, and the description fills remaining gaps, making it fully complete for a queuing 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 description coverage is 100%, so the schema already documents all parameters. The description adds value by explaining the relationship between 'type' and 'id' (matching rows from 'searchmedia'), the mutually exclusive 'id'/'file' constraint, and the semantics of 'next'. This enriches understanding beyond 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?

The description uses a specific verb 'queue' combined with resource context ('item behind the one now playing for continuous playback') and explicitly distinguishes between library id and file path inputs. It clearly differentiates from sibling tools like 'play' and 'playfile' by stating the prerequisite that something must already be playing.

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?

The description provides clear context for when to use the tool: 'Something must already be playing (start with play/playfile).' It also explains the 'next' parameter behavior. However, it does not explicitly state when not to use it or name alternative tools beyond the prerequisite, but the context is sufficient.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/laszlopere/mcp-kodi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server