Skip to main content
Glama

create_post

Create a new feedback post in a Canny board with title, description, category, and custom fields to collect and organize customer feedback.

Instructions

Create a new post in a Canny board

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authorIdYesID of the user creating the post
boardIdYesID of the board to create the post in
categoryIdNoID of the category for the post (optional)
customFieldsNoCustom field values as key-value pairs (optional)
detailsNoDetailed description of the post (optional)
titleYesTitle of the post

Implementation Reference

  • The complete createPostTool object defining the 'create_post' MCP tool, including input schema, description, and handler function that validates args, calls CannyClient.createPost, and formats success response.
    export const createPostTool = { name: 'create_post', description: 'Create a new post in a Canny board', inputSchema: { type: 'object', properties: { authorId: { type: 'string', description: 'ID of the user creating the post' }, boardId: { type: 'string', description: 'ID of the board to create the post in' }, title: { type: 'string', description: 'Title of the post' }, details: { type: 'string', description: 'Detailed description of the post (optional)' }, categoryId: { type: 'string', description: 'ID of the category for the post (optional)' }, customFields: { type: 'object', description: 'Custom field values as key-value pairs (optional)', additionalProperties: true }, }, required: ['authorId', 'boardId', 'title'], additionalProperties: false, }, handler: async (args: unknown, client: CannyClient) => { const { authorId, boardId, title, details, categoryId, customFields } = validateToolInput<CreatePostInput>(args, CreatePostSchema); const response = await client.createPost({ authorID: authorId, boardID: boardId, title, details, categoryID: categoryId, customFields, }); if (response.error) { throw new Error(`Failed to create post: ${response.error}`); } if (!response.data) { return 'Post creation failed - no data returned'; } const post = response.data; return `Successfully created post!\n\n` + `**${post.title}** (ID: ${post.id})\n` + `Board: ${post.board.name}\n` + `Author: ${post.author.name}\n` + `Status: ${post.status}\n` + `Created: ${new Date(post.createdAt).toLocaleString()}\n` + `URL: ${post.url}`; }, };
  • Zod validation schema (CreatePostSchema) used by validateToolInput in the create_post handler for input validation.
    const CreatePostSchema = z.object({ authorId: z.string().min(1, 'Author ID is required'), boardId: z.string().min(1, 'Board ID is required'), title: z.string().min(1, 'Title is required'), details: z.string().optional(), categoryId: z.string().optional(), customFields: z.record(z.any()).optional(), });
  • Registration of createPostTool in the main exported tools array for MCP toolset.
    export const tools: Tool[] = [ // Board management getBoardsTool, // Post management getPostsTool, getPostTool, searchPostsTool, createPostTool, updatePostTool, // Extended functionality - temporarily disabled for debugging // getCategoresTool, // getCommentsTool, // getUsersTool, // getTagsTool, ];
  • CannyClient.createPost helper method invoked by the create_post tool handler to make the API POST request to Canny.
    async createPost(data: { authorID: string; boardID: string; title: string; details?: string; categoryID?: string; customFields?: Record<string, any>; }): Promise<CannyApiResponse<CannyPost>> { return this.makeRequest<CannyPost>({ method: 'POST', url: '/posts/create', data, }); }
  • src/tools/index.ts:3-9 (registration)
    Import statement that brings createPostTool into the index for registration.
    import { getPostsTool, getPostTool, searchPostsTool, createPostTool, updatePostTool } from './posts.js';

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