Commit 2d87d57
committed
fix: Correct WAV conversion to accept EITHER task_id OR audio_id
Per Suno API documentation: 'You can provide either taskId or audioId
to identify the source track'
Changes:
- Update convert_to_wav() signature: callback_url required, task_id and audio_id optional
- Validate that at least one ID (task_id or audio_id) is provided
- Build payload dynamically based on which ID(s) are provided
- Update MCP tool definition to reflect optional parameters
- Update tool handler to support flexible ID parameters
- Add comprehensive docstring with both usage examples
This resolves the 'record does not exist' error by allowing users to
provide just the audio_id (track ID) without requiring the task_id.
Recommended usage: Provide audio_id for precise track conversion,
especially when generation task has multiple tracks.1 parent 2f69bae commit 2d87d57
2 files changed
Lines changed: 56 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | 157 | | |
162 | 158 | | |
163 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
164 | 168 | | |
165 | 169 | | |
166 | | - | |
| 170 | + | |
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
| |||
403 | 407 | | |
404 | 408 | | |
405 | 409 | | |
406 | | - | |
407 | 410 | | |
| 411 | + | |
| 412 | + | |
408 | 413 | | |
409 | | - | |
410 | | - | |
411 | 414 | | |
412 | 415 | | |
413 | 416 | | |
414 | | - | |
415 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
416 | 426 | | |
417 | 427 | | |
418 | 428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
244 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
249 | 253 | | |
250 | | - | |
251 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
255 | 260 | | |
256 | 261 | | |
257 | 262 | | |
258 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
259 | 280 | | |
260 | | - | |
261 | | - | |
262 | 281 | | |
263 | 282 | | |
264 | 283 | | |
265 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
266 | 288 | | |
267 | | - | |
268 | 289 | | |
269 | 290 | | |
270 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
271 | 297 | | |
272 | 298 | | |
273 | 299 | | |
| |||
0 commit comments