UNPKG

hackmd-mcp

Version:

[![smithery badge](https://smithery.ai/badge/@yuna0x0/hackmd-mcp)](https://smithery.ai/server/@yuna0x0/hackmd-mcp)

23 lines (22 loc) 660 B
export function registerTeamsApiTools(server, client) { // Tool: List teams server.tool("list_teams", "List all teams accessible to the user", {}, async () => { try { const teams = await client.getTeams(); return { content: [ { type: "text", text: JSON.stringify(teams, null, 2), }, ], }; } catch (error) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }); }