Skip to main content
Glama
d-kimuson

ESA MCP Server

by d-kimuson

read_esa_multiple_posts

Retrieve multiple posts from esa.io using specified post numbers to access content efficiently.

Instructions

Read multiple posts in esa.io.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamNameNomy-team
postNumbersYes

Implementation Reference

  • Core handler logic for reading multiple ESA posts by parallel API calls to fetch each post and excluding body_html.
    async readPosts(teamName: string, postNumbers: readonly number[]) {
      return await Promise.all(
        postNumbers.map(async (postNumber) => {
          const response = await this.callApi(() =>
            getV1TeamsTeamNamePostsPostNumber(
              teamName,
              postNumber,
              {},
              {
                headers: {
                  Authorization: `Bearer ${this.apiKey}`,
                },
              }
            )
          )
          const { body_html, ...others } = response.data
          return others
        })
      )
    }
  • src/server.ts:122-133 (registration)
    MCP tool registration including name, description, input schema, and thin handler delegating to ApiClient.readPosts via formatTool.
    server.tool(
      "read_esa_multiple_posts",
      "Read multiple posts in esa.io.",
      {
        teamName: z.string().default(getRequiredEnv("DEFAULT_ESA_TEAM")),
        postNumbers: z.array(z.number()),
      },
      async (input) =>
        await formatTool(
          async () => await client.readPosts(input.teamName, input.postNumbers)
        )
    )
  • Zod input schema for the tool: teamName (with default) and array of post numbers.
    {
      teamName: z.string().default(getRequiredEnv("DEFAULT_ESA_TEAM")),
      postNumbers: z.array(z.number()),
    },

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/d-kimuson/esa-mcp-server'

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