Skip to main content
Glama

get_posts

Retrieve posts from a Canny feedback board with filtering options for status, search terms, and sorting to manage customer feedback effectively.

Instructions

Get posts from a specific Canny board with optional filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boardIdYesID of the board to fetch posts from
limitNoNumber of posts to retrieve
searchNoSearch term to filter posts
skipNoNumber of posts to skip for pagination
sortNoSort order for posts
statusNoFilter by post status

Implementation Reference

  • The main handler function for the 'get_posts' tool. It validates the input parameters using Zod schema, calls the Canny client to fetch posts from a board, handles errors, processes the posts data, and returns a formatted string summary of the posts.
    handler: async (args: unknown, client: CannyClient) => {
      const { boardId, limit, skip, status, search, sort } = validateToolInput<GetPostsInput>(args, GetPostsSchema);
      
      const response = await client.getPosts(boardId, { limit, skip, status, search, sort });
      
      if (response.error) {
        throw new Error(`Failed to fetch posts: ${response.error}`);
      }
    
      if (!response.data?.posts || response.data.posts.length === 0) {
        return 'No posts found matching the criteria.';
      }
    
      const posts = response.data.posts.map(post => ({
        id: post.id,
        title: post.title,
        details: post.details?.substring(0, 200) + (post.details && post.details.length > 200 ? '...' : ''),
        status: post.status,
        author: post.author.name,
        votes: post.votes,
        score: post.score,
        tags: post.tags.map(tag => tag.name),
        createdAt: new Date(post.createdAt).toLocaleDateString(),
        url: post.url,
      }));
    
      return `Found ${posts.length} post(s) in board ${boardId}:\n\n${posts
        .map((post, index) => 
          `${index + 1}. **${post.title}** (ID: ${post.id})\n` +
          `   Status: ${post.status} | Votes: ${post.votes} | Score: ${post.score}\n` +
          `   Author: ${post.author} | Created: ${post.createdAt}\n` +
          `   Tags: ${post.tags.length > 0 ? post.tags.join(', ') : 'None'}\n` +
          `   Details: ${post.details || 'No description'}\n` +
          `   URL: ${post.url}\n`
        )
        .join('\n')}${response.data.hasMore ? '\n(More posts available - increase limit or skip to see more)' : ''}`;
    },
  • The JSON schema defining the input parameters for the 'get_posts' tool, including boardId (required), pagination, filtering by status/search/sort options.
    inputSchema: {
      type: 'object',
      properties: {
        boardId: { type: 'string', description: 'ID of the board to fetch posts from' },
        limit: { type: 'number', minimum: 1, maximum: 50, default: 10, description: 'Number of posts to retrieve' },
        skip: { type: 'number', minimum: 0, default: 0, description: 'Number of posts to skip for pagination' },
        status: { 
          type: 'string', 
          enum: ['open', 'under review', 'planned', 'in progress', 'complete', 'closed'],
          description: 'Filter by post status' 
        },
        search: { type: 'string', description: 'Search term to filter posts' },
        sort: { 
          type: 'string', 
          enum: ['newest', 'oldest', 'relevance', 'trending'],
          description: 'Sort order for posts' 
        },
      },
      required: ['boardId'],
      additionalProperties: false,
    },
  • Zod schema used internally for runtime validation of get_posts tool inputs before calling the Canny client.
    const GetPostsSchema = z.object({
      boardId: z.string().min(1, 'Board ID is required'),
      limit: z.number().min(1).max(50).optional().default(10),
      skip: z.number().min(0).optional().default(0),
      status: z.enum(['open', 'under review', 'planned', 'in progress', 'complete', 'closed']).optional(),
      search: z.string().optional(),
      sort: z.enum(['newest', 'oldest', 'relevance', 'trending']).optional(),
    });
  • The main tools array registration where getPostsTool is included (line 34) among other Canny MCP tools.
    export const tools: Tool[] = [
      // Board management
      getBoardsTool,
      
      // Post management
      getPostsTool,
      getPostTool,
      searchPostsTool,
      createPostTool,
      updatePostTool,
    
      // Extended functionality - temporarily disabled for debugging
      // getCategoresTool,
      // getCommentsTool,
      // getUsersTool,
      // getTagsTool,
    ];
  • src/tools/index.ts:3-9 (registration)
    Import statement that brings the getPostsTool into the index module for registration in the tools array.
    import { 
      getPostsTool, 
      getPostTool, 
      searchPostsTool, 
      createPostTool, 
      updatePostTool 
    } from './posts.js';
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions 'optional filtering' but doesn't disclose key behavioral traits like pagination behavior (implied by 'skip' parameter but not explained), rate limits, authentication requirements, or what happens when no posts match. This leaves significant gaps for an agent to understand how to use it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Get posts from a specific Canny board') and adds a useful qualifier ('with optional filtering'). There's no wasted language or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (6 parameters, no annotations, no output schema), the description is insufficient. It doesn't explain return values (e.g., post structure, pagination metadata), error conditions, or how filtering interacts with sorting. For a tool with multiple parameters and siblings, more context is needed for an agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 6 parameters with descriptions, defaults, and enums. The description adds no additional parameter semantics beyond mentioning 'optional filtering', which is already covered by the schema. This meets the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'posts from a specific Canny board' with optional filtering, making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_post' (singular) or 'search_posts', which could cause confusion about when to use each.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'get_post' (for a single post) or 'search_posts' (which might have different search capabilities). The description mentions 'optional filtering' but doesn't clarify if this is the primary filtering tool or how it compares to siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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