Skip to main content
Glama
ErickWendel

Erick Wendel Contributions MCP

by ErickWendel

get_posts

Retrieve and filter Erick Wendel's talks, blog posts, and videos by ID, title, language, or portal, with pagination support for efficient results management.

Instructions

Get a list of posts with optional filtering and pagination.

Input Schema

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

Implementation Reference

  • Full implementation of the getPostsTool (named 'get_posts'), including Zod input schema, description, and the async handler that fetches and formats posts data.
    export const getPostsTool = { 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"), }, 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}`); } } };
  • src/index.ts:28-33 (registration)
    Registration of the getPostsTool with the MCP server using server.tool().
    server.tool( getPostsTool.name, getPostsTool.description, getPostsTool.parameters, getPostsTool.handler );
  • Helper function fetchPosts that executes the GraphQL query to retrieve posts data, called by the tool handler.
    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 name 'get_posts' and description for the tool.
    posts: { name: "get_posts", description: "Get a list of posts with optional filtering and pagination." },

Other Tools

Related 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