import { MCPTool } from "mcp-framework";
import { z } from "zod";
import { RunMelodyCmd } from "../melody/index.js";
interface MelodyQueuePlayInput {
index: number;
}
class MelodyQueuePlayTool extends MCPTool<MelodyQueuePlayInput> {
name = "melody-queue-play";
description = "Play a track from the playback queue using Melody CLI";
schema = {
index: {
type: z.number().positive(),
description: "Index of the track to play from queue",
},
};
async execute({ index }: MelodyQueuePlayInput) {
return RunMelodyCmd("queueplay", index.toString())
}
}
export default MelodyQueuePlayTool;