Skip to content

fix: auto-activate device before playback and add parameter aliases - #56

Merged
marcelmarais merged 2 commits into
marcelmarais:mainfrom
lucasaguilar:fix/auto-activate-device-and-param-aliases
Jun 2, 2026
Merged

fix: auto-activate device before playback and add parameter aliases#56
marcelmarais merged 2 commits into
marcelmarais:mainfrom
lucasaguilar:fix/auto-activate-device-and-param-aliases

Conversation

@lucasaguilar

Copy link
Copy Markdown
Contributor
  • Add ensureActiveDevice() helper that transfers playback to the first available device when none is active, so playMusic works without requiring Spotify to be manually paused first
  • Return real Spotify API errors from playMusic and resumePlayback instead of silently succeeding (was causing LLM agents to retry 8-10x)
  • Add backward-compatible parameter aliases for LLM compatibility: context_uri/device_id/offset in playMusic, album_id in getAlbumTracks, ids in getAlbums (LLMs commonly use Spotify Web API field names)

- Add ensureActiveDevice() helper that transfers playback to the first
  available device when none is active, so playMusic works without
  requiring Spotify to be manually paused first
- Return real Spotify API errors from playMusic and resumePlayback
  instead of silently succeeding (was causing LLM agents to retry 8-10x)
- Add backward-compatible parameter aliases for LLM compatibility:
  context_uri/device_id/offset in playMusic, album_id in getAlbumTracks,
  ids in getAlbums (LLMs commonly use Spotify Web API field names)
@marcelmarais

Copy link
Copy Markdown
Owner

Hey thanks for the contribution. Could you pls fix ci?

@lucasaguilar

Copy link
Copy Markdown
Contributor Author

Ok!, please check again ;)

@jlnbotello

jlnbotello commented Jun 2, 2026

Copy link
Copy Markdown

Thanks @lucasaguilar ! I observed the behavior you reported. I confirm your fix works out-of-the-box. Many thanks :)
Happy MCPing for both!

@marcelmarais
marcelmarais merged commit 313bf05 into marcelmarais:main Jun 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants