Skip to main content
Glama

update_post

Modify existing feedback posts in Canny by updating titles, descriptions, categories, status, or custom fields to keep customer feedback current and organized.

Instructions

Update an existing Canny post

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryIdNoNew category ID for the post (optional)
customFieldsNoUpdated custom field values (optional)
detailsNoNew description for the post (optional)
postIdYesID of the post to update
statusNoNew status for the post (optional)
titleNoNew title for the post (optional)

Implementation Reference

  • The complete implementation of the update_post tool, including schema definition, handler logic that validates input, calls the Canny client to update the post, handles errors, and formats the response.
    export const updatePostTool = { name: 'update_post', description: 'Update an existing Canny post', inputSchema: { type: 'object', properties: { postId: { type: 'string', description: 'ID of the post to update' }, title: { type: 'string', description: 'New title for the post (optional)' }, details: { type: 'string', description: 'New description for the post (optional)' }, categoryId: { type: 'string', description: 'New category ID for the post (optional)' }, customFields: { type: 'object', description: 'Updated custom field values (optional)', additionalProperties: true }, status: { type: 'string', enum: ['open', 'under review', 'planned', 'in progress', 'complete', 'closed'], description: 'New status for the post (optional)' }, }, required: ['postId'], additionalProperties: false, }, handler: async (args: unknown, client: CannyClient) => { const { postId, title, details, categoryId, customFields, status } = validateToolInput<UpdatePostInput>(args, UpdatePostSchema); const response = await client.updatePost(postId, { title, details, categoryID: categoryId, customFields, status, }); if (response.error) { throw new Error(`Failed to update post: ${response.error}`); } if (!response.data) { return 'Post update failed - no data returned'; } const post = response.data; return `Successfully updated post!\n\n` + `**${post.title}** (ID: ${post.id})\n` + `Status: ${post.status}\n` + `Updated: ${new Date(post.updatedAt).toLocaleString()}\n` + `URL: ${post.url}`; }, };
  • Zod schema (UpdatePostSchema) and TypeScript type (UpdatePostInput) for input validation of the update_post tool.
    const UpdatePostSchema = z.object({ postId: z.string().min(1, 'Post ID is required'), title: z.string().optional(), details: z.string().optional(), categoryId: z.string().optional(), customFields: z.record(z.any()).optional(), status: z.enum(['open', 'under review', 'planned', 'in progress', 'complete', 'closed']).optional(), }); type GetPostsInput = z.infer<typeof GetPostsSchema>; type GetPostInput = z.infer<typeof GetPostSchema>; type SearchPostsInput = z.infer<typeof SearchPostsSchema>; type CreatePostInput = z.infer<typeof CreatePostSchema>; type UpdatePostInput = z.infer<typeof UpdatePostSchema>;
  • Registration of the update_post tool (as updatePostTool) in the main tools array exported for use in the MCP server.
    export const tools: Tool[] = [ // Board management getBoardsTool, // Post management getPostsTool, getPostTool, searchPostsTool, createPostTool, updatePostTool, // Extended functionality - temporarily disabled for debugging // getCategoresTool, // getCommentsTool, // getUsersTool, // getTagsTool, ];
  • Individual export of updatePostTool for testing and potential direct use.
    export { getBoardsTool, getPostsTool, getPostTool, searchPostsTool, createPostTool, updatePostTool, // getCategoresTool, // getCommentsTool, // getUsersTool, // getTagsTool, };

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