Skip to main content
Glama

Replace track in playlist

replace_track_in_playlist
DestructiveIdempotent

Replace a track in a SoundCloud playlist with another at the same position, remove duplicate copies, and restore the previous list if the new track is rejected.

Instructions

Replace a track with another at the same position (e.g. a user upload with the official release). The first copy of old_track_id is replaced; any other copy of old_track_id, and any existing copy of new_track_id elsewhere, is removed so the playlist keeps one copy of the new track (they are listed in removed_elsewhere). If SoundCloud does not accept the new track, the previous list is restored and an error is returned.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "playlist_id": "<playlist_id>",
      "old_track_id": "<old_track_id>",
      "new_track_id": "<new_track_id>"
    },
    "name": "replace_track_in_playlist"
  }
}

Input Schema

NameRequiredDescriptionDefault
playlist_idYes
new_track_idYes
old_track_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description goes well beyond them: it discloses which copy of old_track_id is replaced (the first), that other copies of old_track_id and existing copies of new_track_id are removed, where those removals are reported (removed_elsewhere), and that the playlist is rolled back with an error if SoundCloud rejects the new track. That is exactly the collateral-damage and failure-mode information an agent needs before invoking a destructive mutation.

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?

Three sentences, front-loaded with the core action and followed by the tie-breaking/dedupe rule and then the failure behavior. Every sentence adds distinct information; nothing is padded or repeated from the structured fields.

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?

For a destructive, open-world mutation with no output schema and no parameter documentation, the description covers the action, the duplicate-handling rule, the return field that reports side effects, and atomic rollback on failure. Nothing an agent needs in order to call this safely and interpret the result is missing.

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 0%, so the description carries the full burden. It clarifies the semantics of old_track_id (first occurrence is the one replaced) and new_track_id (duplicates elsewhere are pruned), which the bare string-typed schema does not convey. playlist_id is left to be inferred from its name, the only real gap.

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?

States a specific verb and resource ('Replace a track with another at the same position') and pins down the distinguishing semantics versus add/remove: the replacement happens in-place. The parenthetical example ('a user upload with the official release') makes the intent unambiguous, and an agent can distinguish it from remove_track_from_playlist and add_tracks_to_playlist without opening either schema.

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 example use case ('a user upload with the official release') gives a concrete scenario that implies when to choose this over remove+add. It does not explicitly state exclusions or name an alternative sibling, so the routing decision is strongly implied rather than spelled out.

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