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
| Name | Required | Description | Default |
|---|---|---|---|
| teamName | No | my-team | |
| postNumbers | Yes |
Implementation Reference
- src/api.ts:90-109 (handler)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) ) )
- src/server.ts:125-128 (schema)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()), },