// ToolSet内のTool一覧を取得
const tools = await client.listTools("slack-tools");
// Returns: Tool[]
// スラッグでToolを取得
const tool = await client.getTool("slack-tools", "post-message");
// Returns: Tool
// 新しいToolを作成
const newTool = await client.createTool("slack-tools", {
slug: "post-message",
name: { default: "Post Message" },
description: { default: "Post a message to a Slack channel" },
inputSchema: {
type: "object",
properties: {
channel: { type: "string", description: "Channel name or ID" },
text: { type: "string", description: "Message text" },
},
required: ["channel", "text"],
},
outputSchema: {
type: "object",
properties: {
ts: { type: "string" },
channel: { type: "string" },
},
},
code: `// tool implementation code`,
});
// Toolを更新
await client.updateTool("slack-tools", "post-message", {
description: { default: "Post a message to any Slack channel" },
});
// Toolを削除
await client.deleteTool("slack-tools", "post-message");