unsave_orphan_tracks
Find saved tracks that appear in no playlist (orphans) and optionally unsave them. Quota: walks library + all playlists (capped). PREVIEWS BY DEFAULT — pass dry_run=false to commit. Removing 10+ orphans additionally requires elicitation confirmation (or SPOTIFY_MCP_CONFIRM=never for automation).
This record as markdown: /tools/novalux12-spotify-mcp/unsave-orphan-tracks.md
What unsave_orphan_tracks does on Spotify
AI agents call unsave_orphan_tracks to permanently remove resources in Spotify, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
Why unsave_orphan_tracks is rated Critical
Permanently unsaves tracks from library; irreversible removal of saved music data.
From the tool's definition unsave them... pass dry_run=false to commit... Removing 10+ orphans
Attacks that exploit this kind of access
The rule that runs unsave_orphan_tracks safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Spotify, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For unsave_orphan_tracks, this is the rule to start with:
unsave_orphan_tracks is removed from the agent's tool list entirely, so the agent never calls it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Spotify, apply this rule, and every unsave_orphan_tracks call is checked against it from then on.
Questions about unsave_orphan_tracks
Find saved tracks that appear in no playlist (orphans) and optionally unsave them. Quota: walks library + all playlists (capped). PREVIEWS BY DEFAULT — pass dry_run=false to commit. Removing 10+ orphans additionally requires elicitation confirmation (or SPOTIFY_MCP_CONFIRM=never for automation). It is categorised as a Destructive tool in the Spotify MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
Register the Spotify MCP server in PolicyLayer and add a rule for unsave_orphan_tracks: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Spotify. Nothing to install.
unsave_orphan_tracks is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the unsave_orphan_tracks rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for unsave_orphan_tracks. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
unsave_orphan_tracks is provided by the Spotify MCP server (@novalux12/spotify-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Spotify, and thousands of servers like it.
Across the catalogue