@darrenjaws/spotify-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +606 -0
- package/build/bin.d.ts +7 -0
- package/build/bin.d.ts.map +1 -0
- package/build/bin.js +22 -0
- package/build/bin.js.map +1 -0
- package/build/handlers/call-tool.d.ts +6 -0
- package/build/handlers/call-tool.d.ts.map +1 -0
- package/build/handlers/call-tool.js +46 -0
- package/build/handlers/call-tool.js.map +1 -0
- package/build/handlers/tools.d.ts +296 -0
- package/build/handlers/tools.d.ts.map +1 -0
- package/build/handlers/tools.js +246 -0
- package/build/handlers/tools.js.map +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +147 -0
- package/build/index.js.map +1 -0
- package/build/setup.d.ts +7 -0
- package/build/setup.d.ts.map +1 -0
- package/build/setup.js +290 -0
- package/build/setup.js.map +1 -0
- package/build/spotify/auth.d.ts +43 -0
- package/build/spotify/auth.d.ts.map +1 -0
- package/build/spotify/auth.js +263 -0
- package/build/spotify/auth.js.map +1 -0
- package/build/spotify/client.d.ts +14 -0
- package/build/spotify/client.d.ts.map +1 -0
- package/build/spotify/client.js +40 -0
- package/build/spotify/client.js.map +1 -0
- package/build/tools/playback.d.ts +17 -0
- package/build/tools/playback.d.ts.map +1 -0
- package/build/tools/playback.js +143 -0
- package/build/tools/playback.js.map +1 -0
- package/build/tools/playlists.d.ts +11 -0
- package/build/tools/playlists.d.ts.map +1 -0
- package/build/tools/playlists.js +93 -0
- package/build/tools/playlists.js.map +1 -0
- package/build/tools/search.d.ts +6 -0
- package/build/tools/search.d.ts.map +1 -0
- package/build/tools/search.js +62 -0
- package/build/tools/search.js.map +1 -0
- package/build/tools/user.d.ts +8 -0
- package/build/tools/user.d.ts.map +1 -0
- package/build/tools/user.js +103 -0
- package/build/tools/user.js.map +1 -0
- package/build/types.d.ts +56 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +5 -0
- package/build/types.js.map +1 -0
- package/build/utils/logger.d.ts +12 -0
- package/build/utils/logger.d.ts.map +1 -0
- package/build/utils/logger.js +86 -0
- package/build/utils/logger.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool call handler - routes tool calls to appropriate implementations
|
|
3
|
+
*/
|
|
4
|
+
import * as playbackTools from "../tools/playback.js";
|
|
5
|
+
import * as searchTools from "../tools/search.js";
|
|
6
|
+
import * as playlistTools from "../tools/playlists.js";
|
|
7
|
+
import * as userTools from "../tools/user.js";
|
|
8
|
+
export async function handleToolCall(name, args) {
|
|
9
|
+
switch (name) {
|
|
10
|
+
// Playback controls
|
|
11
|
+
case "spotify_play":
|
|
12
|
+
return await playbackTools.play(args);
|
|
13
|
+
case "spotify_pause":
|
|
14
|
+
return await playbackTools.pause(args);
|
|
15
|
+
case "spotify_next":
|
|
16
|
+
return await playbackTools.next(args);
|
|
17
|
+
case "spotify_previous":
|
|
18
|
+
return await playbackTools.previous(args);
|
|
19
|
+
case "spotify_set_volume":
|
|
20
|
+
return await playbackTools.setVolume(args);
|
|
21
|
+
case "spotify_get_playback_state":
|
|
22
|
+
return await playbackTools.getPlaybackState();
|
|
23
|
+
// Search
|
|
24
|
+
case "spotify_search":
|
|
25
|
+
return await searchTools.search(args);
|
|
26
|
+
// Playlists
|
|
27
|
+
case "spotify_get_playlists":
|
|
28
|
+
return await playlistTools.getPlaylists(args);
|
|
29
|
+
case "spotify_get_playlist":
|
|
30
|
+
return await playlistTools.getPlaylist(args);
|
|
31
|
+
case "spotify_create_playlist":
|
|
32
|
+
return await playlistTools.createPlaylist(args);
|
|
33
|
+
case "spotify_add_to_playlist":
|
|
34
|
+
return await playlistTools.addToPlaylist(args);
|
|
35
|
+
// User data
|
|
36
|
+
case "spotify_get_user_profile":
|
|
37
|
+
return await userTools.getUserProfile();
|
|
38
|
+
case "spotify_get_top_items":
|
|
39
|
+
return await userTools.getTopItems(args);
|
|
40
|
+
case "spotify_get_recently_played":
|
|
41
|
+
return await userTools.getRecentlyPlayed(args);
|
|
42
|
+
default:
|
|
43
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=call-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-tool.js","sourceRoot":"","sources":["../../src/handlers/call-tool.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,WAAW,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,aAAa,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAY,EAAE,IAAyB;IAC1E,QAAQ,IAAI,EAAE,CAAC;QACb,oBAAoB;QACpB,KAAK,cAAc;YACjB,OAAO,MAAM,aAAa,CAAC,IAAI,CAAC,IAAW,CAAC,CAAC;QAC/C,KAAK,eAAe;YAClB,OAAO,MAAM,aAAa,CAAC,KAAK,CAAC,IAAW,CAAC,CAAC;QAChD,KAAK,cAAc;YACjB,OAAO,MAAM,aAAa,CAAC,IAAI,CAAC,IAAW,CAAC,CAAC;QAC/C,KAAK,kBAAkB;YACrB,OAAO,MAAM,aAAa,CAAC,QAAQ,CAAC,IAAW,CAAC,CAAC;QACnD,KAAK,oBAAoB;YACvB,OAAO,MAAM,aAAa,CAAC,SAAS,CAAC,IAAW,CAAC,CAAC;QACpD,KAAK,4BAA4B;YAC/B,OAAO,MAAM,aAAa,CAAC,gBAAgB,EAAE,CAAC;QAEhD,SAAS;QACT,KAAK,gBAAgB;YACnB,OAAO,MAAM,WAAW,CAAC,MAAM,CAAC,IAAW,CAAC,CAAC;QAE/C,YAAY;QACZ,KAAK,uBAAuB;YAC1B,OAAO,MAAM,aAAa,CAAC,YAAY,CAAC,IAAW,CAAC,CAAC;QACvD,KAAK,sBAAsB;YACzB,OAAO,MAAM,aAAa,CAAC,WAAW,CAAC,IAAW,CAAC,CAAC;QACtD,KAAK,yBAAyB;YAC5B,OAAO,MAAM,aAAa,CAAC,cAAc,CAAC,IAAW,CAAC,CAAC;QACzD,KAAK,yBAAyB;YAC5B,OAAO,MAAM,aAAa,CAAC,aAAa,CAAC,IAAW,CAAC,CAAC;QAExD,YAAY;QACZ,KAAK,0BAA0B;YAC7B,OAAO,MAAM,SAAS,CAAC,cAAc,EAAE,CAAC;QAC1C,KAAK,uBAAuB;YAC1B,OAAO,MAAM,SAAS,CAAC,WAAW,CAAC,IAAW,CAAC,CAAC;QAClD,KAAK,6BAA6B;YAChC,OAAO,MAAM,SAAS,CAAC,iBAAiB,CAAC,IAAW,CAAC,CAAC;QAExD;YACE,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool definitions for the Spotify MCP server
|
|
3
|
+
*/
|
|
4
|
+
export declare function getToolsList(): ({
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: string;
|
|
9
|
+
properties: {
|
|
10
|
+
uri: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
device_id: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
volume_percent?: undefined;
|
|
19
|
+
query?: undefined;
|
|
20
|
+
type?: undefined;
|
|
21
|
+
limit?: undefined;
|
|
22
|
+
playlist_id?: undefined;
|
|
23
|
+
name?: undefined;
|
|
24
|
+
description?: undefined;
|
|
25
|
+
public?: undefined;
|
|
26
|
+
uris?: undefined;
|
|
27
|
+
position?: undefined;
|
|
28
|
+
time_range?: undefined;
|
|
29
|
+
};
|
|
30
|
+
required?: undefined;
|
|
31
|
+
};
|
|
32
|
+
} | {
|
|
33
|
+
name: string;
|
|
34
|
+
description: string;
|
|
35
|
+
inputSchema: {
|
|
36
|
+
type: string;
|
|
37
|
+
properties: {
|
|
38
|
+
device_id: {
|
|
39
|
+
type: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
uri?: undefined;
|
|
43
|
+
volume_percent?: undefined;
|
|
44
|
+
query?: undefined;
|
|
45
|
+
type?: undefined;
|
|
46
|
+
limit?: undefined;
|
|
47
|
+
playlist_id?: undefined;
|
|
48
|
+
name?: undefined;
|
|
49
|
+
description?: undefined;
|
|
50
|
+
public?: undefined;
|
|
51
|
+
uris?: undefined;
|
|
52
|
+
position?: undefined;
|
|
53
|
+
time_range?: undefined;
|
|
54
|
+
};
|
|
55
|
+
required?: undefined;
|
|
56
|
+
};
|
|
57
|
+
} | {
|
|
58
|
+
name: string;
|
|
59
|
+
description: string;
|
|
60
|
+
inputSchema: {
|
|
61
|
+
type: string;
|
|
62
|
+
properties: {
|
|
63
|
+
volume_percent: {
|
|
64
|
+
type: string;
|
|
65
|
+
description: string;
|
|
66
|
+
minimum: number;
|
|
67
|
+
maximum: number;
|
|
68
|
+
};
|
|
69
|
+
device_id: {
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
uri?: undefined;
|
|
74
|
+
query?: undefined;
|
|
75
|
+
type?: undefined;
|
|
76
|
+
limit?: undefined;
|
|
77
|
+
playlist_id?: undefined;
|
|
78
|
+
name?: undefined;
|
|
79
|
+
description?: undefined;
|
|
80
|
+
public?: undefined;
|
|
81
|
+
uris?: undefined;
|
|
82
|
+
position?: undefined;
|
|
83
|
+
time_range?: undefined;
|
|
84
|
+
};
|
|
85
|
+
required: string[];
|
|
86
|
+
};
|
|
87
|
+
} | {
|
|
88
|
+
name: string;
|
|
89
|
+
description: string;
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: string;
|
|
92
|
+
properties: {
|
|
93
|
+
uri?: undefined;
|
|
94
|
+
device_id?: undefined;
|
|
95
|
+
volume_percent?: undefined;
|
|
96
|
+
query?: undefined;
|
|
97
|
+
type?: undefined;
|
|
98
|
+
limit?: undefined;
|
|
99
|
+
playlist_id?: undefined;
|
|
100
|
+
name?: undefined;
|
|
101
|
+
description?: undefined;
|
|
102
|
+
public?: undefined;
|
|
103
|
+
uris?: undefined;
|
|
104
|
+
position?: undefined;
|
|
105
|
+
time_range?: undefined;
|
|
106
|
+
};
|
|
107
|
+
required?: undefined;
|
|
108
|
+
};
|
|
109
|
+
} | {
|
|
110
|
+
name: string;
|
|
111
|
+
description: string;
|
|
112
|
+
inputSchema: {
|
|
113
|
+
type: string;
|
|
114
|
+
properties: {
|
|
115
|
+
query: {
|
|
116
|
+
type: string;
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
type: {
|
|
120
|
+
type: string;
|
|
121
|
+
enum: string[];
|
|
122
|
+
description: string;
|
|
123
|
+
};
|
|
124
|
+
limit: {
|
|
125
|
+
type: string;
|
|
126
|
+
description: string;
|
|
127
|
+
minimum: number;
|
|
128
|
+
maximum: number;
|
|
129
|
+
};
|
|
130
|
+
uri?: undefined;
|
|
131
|
+
device_id?: undefined;
|
|
132
|
+
volume_percent?: undefined;
|
|
133
|
+
playlist_id?: undefined;
|
|
134
|
+
name?: undefined;
|
|
135
|
+
description?: undefined;
|
|
136
|
+
public?: undefined;
|
|
137
|
+
uris?: undefined;
|
|
138
|
+
position?: undefined;
|
|
139
|
+
time_range?: undefined;
|
|
140
|
+
};
|
|
141
|
+
required: string[];
|
|
142
|
+
};
|
|
143
|
+
} | {
|
|
144
|
+
name: string;
|
|
145
|
+
description: string;
|
|
146
|
+
inputSchema: {
|
|
147
|
+
type: string;
|
|
148
|
+
properties: {
|
|
149
|
+
limit: {
|
|
150
|
+
type: string;
|
|
151
|
+
description: string;
|
|
152
|
+
minimum: number;
|
|
153
|
+
maximum: number;
|
|
154
|
+
};
|
|
155
|
+
uri?: undefined;
|
|
156
|
+
device_id?: undefined;
|
|
157
|
+
volume_percent?: undefined;
|
|
158
|
+
query?: undefined;
|
|
159
|
+
type?: undefined;
|
|
160
|
+
playlist_id?: undefined;
|
|
161
|
+
name?: undefined;
|
|
162
|
+
description?: undefined;
|
|
163
|
+
public?: undefined;
|
|
164
|
+
uris?: undefined;
|
|
165
|
+
position?: undefined;
|
|
166
|
+
time_range?: undefined;
|
|
167
|
+
};
|
|
168
|
+
required?: undefined;
|
|
169
|
+
};
|
|
170
|
+
} | {
|
|
171
|
+
name: string;
|
|
172
|
+
description: string;
|
|
173
|
+
inputSchema: {
|
|
174
|
+
type: string;
|
|
175
|
+
properties: {
|
|
176
|
+
playlist_id: {
|
|
177
|
+
type: string;
|
|
178
|
+
description: string;
|
|
179
|
+
};
|
|
180
|
+
uri?: undefined;
|
|
181
|
+
device_id?: undefined;
|
|
182
|
+
volume_percent?: undefined;
|
|
183
|
+
query?: undefined;
|
|
184
|
+
type?: undefined;
|
|
185
|
+
limit?: undefined;
|
|
186
|
+
name?: undefined;
|
|
187
|
+
description?: undefined;
|
|
188
|
+
public?: undefined;
|
|
189
|
+
uris?: undefined;
|
|
190
|
+
position?: undefined;
|
|
191
|
+
time_range?: undefined;
|
|
192
|
+
};
|
|
193
|
+
required: string[];
|
|
194
|
+
};
|
|
195
|
+
} | {
|
|
196
|
+
name: string;
|
|
197
|
+
description: string;
|
|
198
|
+
inputSchema: {
|
|
199
|
+
type: string;
|
|
200
|
+
properties: {
|
|
201
|
+
name: {
|
|
202
|
+
type: string;
|
|
203
|
+
description: string;
|
|
204
|
+
};
|
|
205
|
+
description: {
|
|
206
|
+
type: string;
|
|
207
|
+
description: string;
|
|
208
|
+
};
|
|
209
|
+
public: {
|
|
210
|
+
type: string;
|
|
211
|
+
description: string;
|
|
212
|
+
};
|
|
213
|
+
uri?: undefined;
|
|
214
|
+
device_id?: undefined;
|
|
215
|
+
volume_percent?: undefined;
|
|
216
|
+
query?: undefined;
|
|
217
|
+
type?: undefined;
|
|
218
|
+
limit?: undefined;
|
|
219
|
+
playlist_id?: undefined;
|
|
220
|
+
uris?: undefined;
|
|
221
|
+
position?: undefined;
|
|
222
|
+
time_range?: undefined;
|
|
223
|
+
};
|
|
224
|
+
required: string[];
|
|
225
|
+
};
|
|
226
|
+
} | {
|
|
227
|
+
name: string;
|
|
228
|
+
description: string;
|
|
229
|
+
inputSchema: {
|
|
230
|
+
type: string;
|
|
231
|
+
properties: {
|
|
232
|
+
playlist_id: {
|
|
233
|
+
type: string;
|
|
234
|
+
description: string;
|
|
235
|
+
};
|
|
236
|
+
uris: {
|
|
237
|
+
type: string;
|
|
238
|
+
items: {
|
|
239
|
+
type: string;
|
|
240
|
+
};
|
|
241
|
+
description: string;
|
|
242
|
+
};
|
|
243
|
+
position: {
|
|
244
|
+
type: string;
|
|
245
|
+
description: string;
|
|
246
|
+
};
|
|
247
|
+
uri?: undefined;
|
|
248
|
+
device_id?: undefined;
|
|
249
|
+
volume_percent?: undefined;
|
|
250
|
+
query?: undefined;
|
|
251
|
+
type?: undefined;
|
|
252
|
+
limit?: undefined;
|
|
253
|
+
name?: undefined;
|
|
254
|
+
description?: undefined;
|
|
255
|
+
public?: undefined;
|
|
256
|
+
time_range?: undefined;
|
|
257
|
+
};
|
|
258
|
+
required: string[];
|
|
259
|
+
};
|
|
260
|
+
} | {
|
|
261
|
+
name: string;
|
|
262
|
+
description: string;
|
|
263
|
+
inputSchema: {
|
|
264
|
+
type: string;
|
|
265
|
+
properties: {
|
|
266
|
+
type: {
|
|
267
|
+
type: string;
|
|
268
|
+
enum: string[];
|
|
269
|
+
description: string;
|
|
270
|
+
};
|
|
271
|
+
time_range: {
|
|
272
|
+
type: string;
|
|
273
|
+
enum: string[];
|
|
274
|
+
description: string;
|
|
275
|
+
};
|
|
276
|
+
limit: {
|
|
277
|
+
type: string;
|
|
278
|
+
description: string;
|
|
279
|
+
minimum: number;
|
|
280
|
+
maximum: number;
|
|
281
|
+
};
|
|
282
|
+
uri?: undefined;
|
|
283
|
+
device_id?: undefined;
|
|
284
|
+
volume_percent?: undefined;
|
|
285
|
+
query?: undefined;
|
|
286
|
+
playlist_id?: undefined;
|
|
287
|
+
name?: undefined;
|
|
288
|
+
description?: undefined;
|
|
289
|
+
public?: undefined;
|
|
290
|
+
uris?: undefined;
|
|
291
|
+
position?: undefined;
|
|
292
|
+
};
|
|
293
|
+
required: string[];
|
|
294
|
+
};
|
|
295
|
+
})[];
|
|
296
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/handlers/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,wBAAgB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoP3B"}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool definitions for the Spotify MCP server
|
|
3
|
+
*/
|
|
4
|
+
export function getToolsList() {
|
|
5
|
+
return [
|
|
6
|
+
// Playback controls
|
|
7
|
+
{
|
|
8
|
+
name: "spotify_play",
|
|
9
|
+
description: "Start or resume playback of a track, album, artist, or playlist",
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
uri: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "Spotify URI to play (e.g., spotify:track:xxx, spotify:playlist:xxx)",
|
|
16
|
+
},
|
|
17
|
+
device_id: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "Optional: Device ID to play on",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "spotify_pause",
|
|
26
|
+
description: "Pause current playback",
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: "object",
|
|
29
|
+
properties: {
|
|
30
|
+
device_id: {
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "Optional: Device ID",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "spotify_next",
|
|
39
|
+
description: "Skip to next track",
|
|
40
|
+
inputSchema: {
|
|
41
|
+
type: "object",
|
|
42
|
+
properties: {
|
|
43
|
+
device_id: {
|
|
44
|
+
type: "string",
|
|
45
|
+
description: "Optional: Device ID",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "spotify_previous",
|
|
52
|
+
description: "Skip to previous track",
|
|
53
|
+
inputSchema: {
|
|
54
|
+
type: "object",
|
|
55
|
+
properties: {
|
|
56
|
+
device_id: {
|
|
57
|
+
type: "string",
|
|
58
|
+
description: "Optional: Device ID",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "spotify_set_volume",
|
|
65
|
+
description: "Set playback volume (0-100)",
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: "object",
|
|
68
|
+
properties: {
|
|
69
|
+
volume_percent: {
|
|
70
|
+
type: "number",
|
|
71
|
+
description: "Volume level (0-100)",
|
|
72
|
+
minimum: 0,
|
|
73
|
+
maximum: 100,
|
|
74
|
+
},
|
|
75
|
+
device_id: {
|
|
76
|
+
type: "string",
|
|
77
|
+
description: "Optional: Device ID",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
required: ["volume_percent"],
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "spotify_get_playback_state",
|
|
85
|
+
description: "Get current playback state including track, artist, album, and playback status",
|
|
86
|
+
inputSchema: {
|
|
87
|
+
type: "object",
|
|
88
|
+
properties: {},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
// Search
|
|
92
|
+
{
|
|
93
|
+
name: "spotify_search",
|
|
94
|
+
description: "Search for tracks, albums, artists, or playlists",
|
|
95
|
+
inputSchema: {
|
|
96
|
+
type: "object",
|
|
97
|
+
properties: {
|
|
98
|
+
query: {
|
|
99
|
+
type: "string",
|
|
100
|
+
description: "Search query",
|
|
101
|
+
},
|
|
102
|
+
type: {
|
|
103
|
+
type: "string",
|
|
104
|
+
enum: ["track", "album", "artist", "playlist"],
|
|
105
|
+
description: "Type of item to search for",
|
|
106
|
+
},
|
|
107
|
+
limit: {
|
|
108
|
+
type: "number",
|
|
109
|
+
description: "Number of results to return (default: 10, max: 50)",
|
|
110
|
+
minimum: 1,
|
|
111
|
+
maximum: 50,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
required: ["query", "type"],
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
// Playlists
|
|
118
|
+
{
|
|
119
|
+
name: "spotify_get_playlists",
|
|
120
|
+
description: "Get current user's playlists",
|
|
121
|
+
inputSchema: {
|
|
122
|
+
type: "object",
|
|
123
|
+
properties: {
|
|
124
|
+
limit: {
|
|
125
|
+
type: "number",
|
|
126
|
+
description: "Number of playlists to return (default: 20)",
|
|
127
|
+
minimum: 1,
|
|
128
|
+
maximum: 50,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "spotify_get_playlist",
|
|
135
|
+
description: "Get details of a specific playlist",
|
|
136
|
+
inputSchema: {
|
|
137
|
+
type: "object",
|
|
138
|
+
properties: {
|
|
139
|
+
playlist_id: {
|
|
140
|
+
type: "string",
|
|
141
|
+
description: "Spotify playlist ID",
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
required: ["playlist_id"],
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "spotify_create_playlist",
|
|
149
|
+
description: "Create a new playlist",
|
|
150
|
+
inputSchema: {
|
|
151
|
+
type: "object",
|
|
152
|
+
properties: {
|
|
153
|
+
name: {
|
|
154
|
+
type: "string",
|
|
155
|
+
description: "Playlist name",
|
|
156
|
+
},
|
|
157
|
+
description: {
|
|
158
|
+
type: "string",
|
|
159
|
+
description: "Playlist description",
|
|
160
|
+
},
|
|
161
|
+
public: {
|
|
162
|
+
type: "boolean",
|
|
163
|
+
description: "Whether the playlist should be public (default: true)",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
required: ["name"],
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: "spotify_add_to_playlist",
|
|
171
|
+
description: "Add tracks to a playlist",
|
|
172
|
+
inputSchema: {
|
|
173
|
+
type: "object",
|
|
174
|
+
properties: {
|
|
175
|
+
playlist_id: {
|
|
176
|
+
type: "string",
|
|
177
|
+
description: "Spotify playlist ID",
|
|
178
|
+
},
|
|
179
|
+
uris: {
|
|
180
|
+
type: "array",
|
|
181
|
+
items: {
|
|
182
|
+
type: "string",
|
|
183
|
+
},
|
|
184
|
+
description: "Array of Spotify track URIs to add",
|
|
185
|
+
},
|
|
186
|
+
position: {
|
|
187
|
+
type: "number",
|
|
188
|
+
description: "Position to insert tracks (default: end of playlist)",
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
required: ["playlist_id", "uris"],
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
// User data
|
|
195
|
+
{
|
|
196
|
+
name: "spotify_get_user_profile",
|
|
197
|
+
description: "Get current user's profile information",
|
|
198
|
+
inputSchema: {
|
|
199
|
+
type: "object",
|
|
200
|
+
properties: {},
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: "spotify_get_top_items",
|
|
205
|
+
description: "Get user's top artists or tracks",
|
|
206
|
+
inputSchema: {
|
|
207
|
+
type: "object",
|
|
208
|
+
properties: {
|
|
209
|
+
type: {
|
|
210
|
+
type: "string",
|
|
211
|
+
enum: ["artists", "tracks"],
|
|
212
|
+
description: "Type of items to get",
|
|
213
|
+
},
|
|
214
|
+
time_range: {
|
|
215
|
+
type: "string",
|
|
216
|
+
enum: ["short_term", "medium_term", "long_term"],
|
|
217
|
+
description: "Time range: short_term (4 weeks), medium_term (6 months), long_term (all time)",
|
|
218
|
+
},
|
|
219
|
+
limit: {
|
|
220
|
+
type: "number",
|
|
221
|
+
description: "Number of items to return (default: 20)",
|
|
222
|
+
minimum: 1,
|
|
223
|
+
maximum: 50,
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
required: ["type"],
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: "spotify_get_recently_played",
|
|
231
|
+
description: "Get user's recently played tracks",
|
|
232
|
+
inputSchema: {
|
|
233
|
+
type: "object",
|
|
234
|
+
properties: {
|
|
235
|
+
limit: {
|
|
236
|
+
type: "number",
|
|
237
|
+
description: "Number of tracks to return (default: 20)",
|
|
238
|
+
minimum: 1,
|
|
239
|
+
maximum: 50,
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
];
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/handlers/tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,UAAU,YAAY;IAC1B,OAAO;QACL,oBAAoB;QACpB;YACE,IAAI,EAAE,cAAc;YACpB,WAAW,EAAE,iEAAi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,WAAW,EAAE,sBAAsB;qBACpC;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,WAAW,CAAC;wBAChD,WAAW,EAAE,gFAAgF;qBAC9F;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,yCAAyC;wBACtD,OAAO,EAAE,CAAC;wBACV,OAAO,EAAE,EAAE;qBACZ;iBACF;gBACD,QAAQ,EAAE,CAAC,MAAM,CAAC;aACnB;SACF;QACD;YACE,IAAI,EAAE,6BAA6B;YACnC,WAAW,EAAE,mCAAmC;YAChD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,0CAA0C;wBACvD,OAAO,EAAE,CAAC;wBACV,OAAO,EAAE,EAAE;qBACZ;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|