Skip to main content
Glama

searchmedia

Find playable media files in a Kodi library by name, with filters for artist, actor, or director. Provides paginated results and total count.

Instructions

Find playable files by name: music/tv-show/movie, drilled to leaf files with paging (limit/offset) and a total count. For music, title means the ALBUM name — songs cannot be matched by their own title. Movie and tv-show queries can also filter by actor/director. Finds media items only — for people lookups (bands, artists, who is in the library) use contributors. Returns { "type", "total", "returned", "offset", "truncated", "rows": [ { "file", "id", "label", "title", … } ] }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceNoTarget Kodi instance. Omitted uses the default ("(null)").
typeYesMedia kind to search: music | tv-show | movie.
artistNoMusic only: performer name (substring, case-insensitive). Resolves the artist; music needs artist or title.
actorNomovie/tv-show only: cast-member name (substring, case-insensitive). For tv-show it matches episode cast, which includes guest stars; combinable with title.
directorNomovie/tv-show only: director name (substring, case-insensitive). For tv-show it matches per-episode directors; combinable with title.
titleNoContainer/title to match (substring, case-insensitive): album for music, show for tv-show, the movie title for movie. tv-show needs title, actor or director; without title the person is matched library-wide and rows carry showtitle. Music without artist resolves the album library-wide.
seasonNotv-show only: season number to narrow the episodes.
numberNoPosition within the container: track number (music) or episode number (tv-show).
limitNoMax leaf rows to return (default 50, max 500). Page with offset.
offsetNoNumber of leaf rows to skip — paginate together with limit.
countNoWhen true, return only the total match count (zero rows) — a cheap count.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesThe searched media type, echoed back.
totalYesFull match count, before any paging.
returnedYesRows in this page.
offsetYesRows skipped before this page.
truncatedYesWhether matches remain beyond this page.
approximateNoPresent (true) when total/paging are app-side estimates (a substring title matched several albums).
resolvedNoThe container the query resolved to — { "artist"?|"show"?, "artistid"|"tvshowid" } — when it drilled through one.
rowsYesThe matching leaf rows, paged.
Behavior5/5

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

Without annotations, description fully discloses behavior: pagination via limit/offset, cheap count via 'count' boolean, drilling to leaf files, return structure (type, total, returned, offset, truncated, rows) with key fields. It also explains edge cases like album-level search for music and cast/director matching per episode.

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?

Description is a single paragraph with efficient front-loading of main purpose, followed by key constraints and return format. Every sentence adds value without redundancy. Appropriate length for the tool's complexity.

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 11 parameters, 100% schema coverage, and an implied output schema (listed in description), the description covers all necessary context: pagination, cheap count, media-type-specific behaviors, and exclusion of people lookups. No gaps remain for an AI agent to successfully invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all 11 parameters with 100% description coverage, but description adds critical meaning beyond schema: title means album for music; for tv-show, actor matches episode cast including guest stars; director per episode; library-wide matching when certain parameters omitted. This enriches parameter understanding.

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 the tool finds playable files by name for music, tv-show, movie with pagination and total count. It explicitly distinguishes itself from the sibling 'contributors' tool for people lookups. The verb 'Find' and resource 'playable files' are specific and unambiguous.

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?

Description provides explicit when-to-use (for media items) and when-not-to-use (for people, use contributors). It details constraints per media type: music title is album name, tv-show requires title/actor/director, and combinability of filters. This guides correct invocation.

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