Skip to main content
Glama
ErickWendel

Erick Wendel Contributions MCP

by ErickWendel

get_posts

Retrieve posts from Erick Wendel's contributions with filtering by ID, title, language, or portal, and pagination controls.

Instructions

Get a list of posts with optional filtering and pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoFilter posts by ID
titleNoFilter posts by title
languageNoFilter posts by language
portalNoFilter posts by portal
skipNoNumber of posts to skip
limitNoMaximum number of posts to return

Implementation Reference

  • The handler function that executes the get_posts tool logic: fetches posts via API service and returns formatted JSON results as MCP text content.
    handler: async (params: PostsParams): Promise<McpResponse> => {
      try {
        const result = await fetchPosts(params);
    
        if (!result.getPosts) {
          throw new Error('No results returned from API');
        }
    
        const content: McpTextContent = {
          type: "text",
          text: `Posts Results:\n\n${JSON.stringify(result.getPosts, null, 2)}`
        };
    
        return {
          content: [content],
        };
      } catch (error) {
        throw new Error(`Failed to fetch posts: ${error.message}`);
      }
    }
  • Tool schema including name, description, and Zod-based input parameters for filtering and pagination.
    name: TOOL_CONFIG.posts.name,
    description: TOOL_CONFIG.posts.description,
    parameters: {
      id: z.string().optional().describe("Filter posts by ID"),
      title: z.string().optional().describe("Filter posts by title"),
      language: z.string().optional().describe("Filter posts by language"),
      portal: z.string().optional().describe("Filter posts by portal"),
      skip: z.number().optional().default(0).describe("Number of posts to skip"),
      limit: z.number().optional().default(10).describe("Maximum number of posts to return"),
    },
  • src/index.ts:28-33 (registration)
    Registration of the getPostsTool with the MCP server.
    server.tool(
      getPostsTool.name,
      getPostsTool.description,
      getPostsTool.parameters,
      getPostsTool.handler
    );
  • Helper function that performs the actual GraphQL query to fetch posts from the API.
    /**
     * Fetches posts with optional filtering and pagination
     */
    export async function fetchPosts(params: {
      id?: string;
      title?: string;
      language?: string;
      portal?: string;
      skip?: number;
      limit?: number;
    }): Promise<PostsResponse> {
      const { id, title, language, portal, skip, limit } = params;
      const languageCode = getLanguageCode(language);
    
      return await client.query({
        getPosts: {
          __args: {
            _id: id,
            title,
            language: languageCode,
            portal,
            skip,
            limit,
          },
          totalCount: true,
          retrieved: true,
          processedIn: true,
          posts: {
            _id: true,
            title: true,
            abstract: true,
            type: true,
            link: true,
            additionalLinks: true,
            portal: {
              link: true,
              name: true,
            },
            tags: true,
            language: true,
            date: true,
          },
        },
      }) as PostsResponse;
    }
  • Configuration defining the tool name and description for get_posts.
    posts: {
      name: "get_posts",
      description: "Get a list of posts with optional filtering and pagination."
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves a list with filtering and pagination but doesn't cover critical aspects like whether it's read-only, rate limits, authentication needs, error handling, or what the return format looks like (e.g., JSON structure). This leaves significant gaps for an agent to understand the tool's behavior.

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 a list of posts') and adds essential qualifiers ('with optional filtering and pagination') without any wasted words. It's appropriately sized for the tool's complexity.

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

Completeness3/5

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

Given the tool's moderate complexity (6 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose and hints at parameter usage but lacks details on behavioral traits, return values, and sibling differentiation, making it minimally viable but with clear gaps.

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?

The description mentions 'optional filtering and pagination,' which aligns with parameters like 'id', 'title', 'skip', and 'limit' in the schema. However, with 100% schema description coverage, the schema already fully documents all 6 parameters, so the description adds minimal value beyond reinforcing the general purpose of filtering and pagination.

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 ('list of posts'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'get_talks' or 'get_videos' beyond mentioning posts specifically, so it lacks explicit sibling distinction.

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?

The description mentions 'optional filtering and pagination' but provides no guidance on when to use this tool versus alternatives like 'get_talks' or 'get_videos', nor does it specify any prerequisites or exclusions for usage.

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/ErickWendel/erickwendel-contributions-mcp'

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