Skip to content

Conversation

@steveluc
Copy link
Contributor

Summary

This PR adds support for creating playlists with lists of songs specified by title and artist, eliminating the need to first search for tracks and build a track list before creating or adding to playlists.

Changes

Schema Enhancements (playerSchema.ts)

  1. Added SongSpecification interface

    • Allows specifying songs by trackName, optional artist, and optional albumName
  2. Extended CreatePlaylistAction

    • Added optional songs?: SongSpecification[] parameter
    • Now supports creating a playlist with songs in one action
    • Maintains backward compatibility (songs parameter is optional)
  3. Added AddSongsToPlaylistAction

    • New action for bulk adding songs to existing playlists
    • Takes playlist name and array of song specifications

Implementation (client.ts)

  1. Added searchSongsAndGetUris helper function

    • Searches Spotify for each song specification
    • Builds optimal search queries using track name, artist, and album
    • Returns URIs for found songs and list of songs not found
  2. Enhanced createPlaylist handler

    • Searches for songs if provided in parameters
    • Creates playlist with all found songs
    • Reports songs that couldn't be found
  3. Implemented addSongsToPlaylist handler

    • Finds playlist by name
    • Searches for specified songs
    • Adds found tracks to playlist
    • Reports success with count and any songs not found

Validation Support (playerHandlers.ts)

  • Added addSongsToPlaylist to playlist name validation autocomplete

Example Usage

Users can now make requests like:

  • "Create a playlist called 'My Favorites' with these songs: Blinding Lights by The Weeknd, Shape of You by Ed Sheeran"
  • "Add the top 10 current Spotify streaming songs to a new playlist called 'Top Hits'"
  • "Add these songs to my 'Workout' playlist: Lose Yourself by Eminem, Till I Collapse by Eminem"

Testing

Successfully tested by creating a "Top Hits" playlist with 10 songs in a single request. The agent correctly:

  • Parsed the natural language request
  • Extracted all song titles and artists into SongSpecification objects
  • Searched Spotify for each song
  • Created the playlist with all 10 tracks
  • Reported success

See test results in MCP server log showing the parsed action with all song specifications.

Benefits

✅ Create playlists with songs in one request
✅ Add multiple songs to playlists without building track lists first
✅ Flexible search with track name, artist, and album support
✅ Clear error reporting for songs not found
✅ Backward compatible - existing functionality unchanged
✅ Uses Spotify batch API for efficient operations

steveluc and others added 9 commits January 16, 2026 23:19
Introduces a new MCP (Model Context Protocol) server that enables Claude Code to execute TypeAgent commands for music playback, list management, calendar operations, and other natural language tasks.

Key features:
- Connects Claude Code to TypeAgent dispatcher via WebSocket
- Automatic reconnection with 5-second retry interval
- Comprehensive logging to temp files for debugging
- Supports natural language commands (e.g., "play bohemian rhapsody", "add milk to grocery list")
- Clean output formatting with HTML image tags stripped

Includes example configuration for .mcp.json and detailed installation instructions in README.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add trademark section to README
- Remove dist-test build outputs from git
- Fix package.json field ordering (use exports instead of main)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Use exact trademark text format with proper line breaks
- Sort package.json scripts alphabetically

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit enhances the split editor command in the Coda extension to support more flexible editor selection and improves TypeAgent schema disambiguation.

**Bug Fixes:**
- Fix off-by-one error when selecting "first" or "last" editor by sorting by viewColumn
- Fix multiple split issue by adding conditionals to focus changes
- Remove unnecessary focus restoration logic for voice command scenarios

**Features:**
- Add support for splitting editors by position: "first", "last", "active", or numeric index
- Add support for splitting editors by file name: "split app.tsx to the right"
- Search all open tabs using tabGroups API, not just visible editors
- Automatically open and focus files found in background tabs before splitting

**Schema Improvements:**
- Add clear disambiguation between splitEditor and moveCursorInFile actions
- Add "USE THIS for" and "DO NOT USE for" guidance in schema comments
- Add concrete examples to help LLM choose correct action
- Remove moveCursorInFile reference from main code schema (not useful for voice)

**Documentation:**
- Add VSCODE_CAPABILITIES.md documenting all VSCode automation features
- Update split editor examples to show new position and file-based splitting

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This enhancement allows the player agent to create playlists with songs
specified by title and artist, and to add lists of songs to existing
playlists, eliminating the need to search and build a track list first.

Changes:
- Add SongSpecification interface for specifying songs by track name,
  optional artist, and optional album
- Extend CreatePlaylistAction with optional songs parameter to support
  creating playlists with songs in one action
- Add new AddSongsToPlaylistAction for bulk adding songs to existing
  playlists
- Implement searchSongsAndGetUris helper function to search Spotify
  for songs and collect their URIs
- Update createPlaylist handler to search for and add songs when
  creating playlists
- Add addSongsToPlaylist handler for the new action
- Add validation support for the new action in playerHandlers

Benefits:
- Users can create playlists with songs in a single request
- Supports requests like "create a playlist with the top 10 songs"
- Provides feedback on songs that couldn't be found
- Maintains backward compatibility with existing createPlaylist usage

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@steveluc steveluc temporarily deployed to development-fork January 19, 2026 08:10 — with GitHub Actions Inactive
@steveluc steveluc deployed to development-fork January 19, 2026 08:10 — with GitHub Actions Active
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.

2 participants