Skip to main content
Glama

get_library_sections_by_section_id_nearest

Read-onlyIdempotent

Find audio tracks in a Plex library section closest to a given music analysis. Specify section ID, type, values, limit, and max distance to retrieve tracks with similar audio characteristics.

Instructions

The nearest audio tracks.

GET /library/sections/{sectionId}/nearest

Args: section_id: Section identifier type: The metadata type to fetch (should be 10 for audio track) values: The music analysis to center the search. Typically obtained from the musicAnalysis of a track limit: The limit of the number of items to fetch; defaults to 50 max_distance: The maximum distance to search, defaults to 0.25

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo
limitNo
valuesNo
section_idYes
max_distanceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint false. The description adds useful behavioral details beyond annotations: the search is centered on music analysis, type 10 is the audio-track convention, and limit/max_distance have defaults.

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 compact and front-loaded with a purpose statement, then the endpoint and a tidy Args block. There is no filler or duplication of schema structure.

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?

All five parameters are explained, including non-obvious ones like 'values' and 'type'. Since an output schema exists, return-format details are unnecessary; the only slight gap is not addressing when to use this over the metadata-level nearest sibling.

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 description coverage is 0%, so the description carries the full burden. It compensates well by explaining every parameter: section_id, type's expected value, values' provenance, and the defaults for limit and max_distance.

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 states the resource and operation: it returns the nearest audio tracks for a library section. The endpoint and 'audio tracks' qualifier make the purpose clear, though it does not explicitly distinguish this from the sibling get_library_metadata_by_id_nearest.

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 usage context, especially that 'values' should come from a track's musicAnalysis and 'type' should be 10 for audio tracks. It does not name alternatives or when-not-to-use conditions, but the intended scenario is reasonably evident.

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

Deploy Server

Other Tools