import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { apiRequest, formatResponse, textContent } from "../api-client.js";
interface Pod {
id: number;
name: string;
}
export function registerPodTools(server: McpServer) {
// List pods
server.tool(
"list_pods",
"List all pods. Pods are organizational units that group clients and team members.",
{},
async () => {
const response = await apiRequest<Pod[]>("/pods.json");
if (response.error) {
return textContent(`Error: ${response.error}`);
}
return textContent(formatResponse(response));
}
);
}