delete_track
Remove a specific track by index from Ableton Live using the MCP server. Specify the track type as 'audio', 'midi', or 'return' for precise deletion.
Instructions
delete track by index
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | [int] index of track | |
| type | Yes | the type of track, "return", "audio", "midi" |
Implementation Reference
- src/tools/song-tools.ts:80-94 (handler)The handler function that executes the delete_track tool, deleting the specified track using Ableton APIs based on track type.
async deleteTrack({ index, type }: { index: number, type: TrackType }) { switch (type) { case TrackType.midi: case TrackType.audio: await ableton.song.deleteTrack(index) break case TrackType.return: await ableton.song.deleteReturnTrack(index) break default: throw new Error('Invalid track type') } return Result.ok() } - src/tools/song-tools.ts:72-79 (registration)The @tool decorator that registers the deleteTrack method as the 'delete_track' tool with description and params schema.
@tool({ name: 'delete_track', description: 'delete track by index', paramsSchema: { index: z.number().describe('[int] index of track'), type: ZodTrackType, } }) - src/tools/song-tools.ts:75-78 (schema)The Zod input schema defining parameters for the delete_track tool: index (number) and type (TrackType).
paramsSchema: { index: z.number().describe('[int] index of track'), type: ZodTrackType, }