Skip to main content
Glama

playfile

Start playback of a media file by its path. Uses Player.Open to play any reachable file and returns the player state snapshot.

Instructions

Play one file by path (e.g. a searchmedia result's file): Player.Open auto-selects the audio/video player. Works for any reachable path, in-library or not. A file missing from disk (stale library entry) is reported as an error. Returns the player-state snapshot { "state", "media", "id", "title", "artist", "time", "totaltime", … }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceNoTarget Kodi instance. Omitted uses the default ("(null)").
fileYesPath of the file to play — the `file` field of a `searchmedia` result row. Any path Kodi can reach works, in-library or not.

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.
Behavior4/5

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

With no annotations, description discloses key behaviors: uses Player.Open, auto-selects player, error reporting for missing files, and return structure. Lacks details on auth or side effects but sufficient for playback intent.

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?

Concise three sentences with front-loaded core action. Every sentence adds information, no 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?

Covers core functionality, error handling, and return value. Output schema exists for return details, making the description complete for this simple 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%, and description adds context beyond schema (e.g., file comes from searchmedia, instance default behavior). Adds value without redundancy.

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?

Description clearly states 'Play one file by path', specifying the verb and resource. Distinguishes itself from siblings like 'play' and 'queue' by focusing on direct file playback via path.

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?

Provides usage context such as 'a searchmedia result's file' and 'works for any reachable path', but does not explicitly compare to siblings or state when not to use.

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