import { z } from "zod";
import { fetchCommentById } from "../services/gamma.js";
const schema = z.object({
id: z.string().describe("The comment ID"),
});
export const getCommentByIdTool = {
name: "get_comment_by_id",
description: "Get a comment by id. Source: id from list_comments. Example: id=2064395.",
parameters: schema,
execute: async (args: z.infer<typeof schema>) => {
try {
const data = await fetchCommentById(args.id);
return JSON.stringify(data, null, 2);
} catch (error) {
return JSON.stringify({ error: error instanceof Error ? error.message : String(error) });
}
},
};