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