Skip to main content
Glama
boards.ts1.48 kB
import { z } from 'zod'; import { CannyClient } from '../client/canny.js'; import { validateToolInput } from '../utils/validation.js'; const GetBoardsSchema = z.object({}); type GetBoardsInput = z.infer<typeof GetBoardsSchema>; /** * Tool to list all accessible Canny boards * Customer-Centric: Provides clear overview of available boards */ export const getBoardsTool = { name: 'get_boards', description: 'List all Canny boards accessible with the current API key', inputSchema: { type: 'object', properties: {}, additionalProperties: false, }, handler: async (args: unknown, client: CannyClient) => { validateToolInput<GetBoardsInput>(args, GetBoardsSchema); const response = await client.getBoards(); if (response.error) { throw new Error(`Failed to fetch boards: ${response.error}`); } if (!response.data || response.data.length === 0) { return 'No boards found or you do not have access to any boards.'; } const boards = response.data.map(board => ({ id: board.id, name: board.name, url: board.url, postCount: board.postCount, isPrivate: board.isPrivate, })); return `Found ${boards.length} board(s):\n\n${boards .map(board => `**${board.name}** (ID: ${board.id})\n` + ` - URL: ${board.url}\n` + ` - Posts: ${board.postCount}\n` + ` - Private: ${board.isPrivate ? 'Yes' : 'No'}\n` ) .join('\n')}`; }, };

Implementation Reference

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/itsocialist/canny-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server