Skip to main content
Glama

playlist_trim

Trim any Spotify playlist to a specified length, keeping the first, last, or random tracks. Preview changes with a dry run before applying.

Instructions

Trim playlist to N items (keep first/last/random). Quota: 🟢 GET all + PUT/POST.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keepYes
dry_runNoPreview only: validate inputs and describe exactly what would change without performing it
keep_whichNofirst
playlist_idYes
Behavior3/5

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

The quota line discloses that the tool reads all playlist items and then writes via PUT/POST, which is a useful behavioral trait beyond the simple verb. However, with no annotations provided, the description still omits important context such as whether the mutation is reversible, whether it requires playlist ownership, and what the response contains.

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 two compact clauses with zero wasted words. The core purpose is front-loaded, and the quota note is placed second for quick scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the essential operation and one behavioral detail (quota), which is adequate for a straightforward mutation tool. But with no output schema and no annotations, it leaves gaps around return value, error cases, and preconditions that an agent would need to fully trust the call.

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?

'N items' clarifies the `keep` parameter and 'first/last/random' defines the `keep_which` enum, adding meaning the schema lacks. However, `playlist_id` semantics are only inferable from its name, `dry_run` is absent from the description (though well-described in the schema), and overall schema description coverage is only 25%, so compensation is only partial.

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 states a precise action ('Trim playlist to N items') with an explicit resource and scope, and the parenthetical 'keep first/last/random' differentiates it from sibling tools like playlist_trim_to_duration or playlist_slice. This is a specific, unambiguous purpose statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to choose this tool over closely related siblings such as playlist_trim_to_duration, playlist_slice, or playlist_keep_only. The quota note ('GET all + PUT/POST') is informational about cost, not a usage condition or alternative-selection rule.

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/NovaLux12/spotify-mcp-server'

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