Skip to main content
Glama
d-kimuson

ESA MCP Server

by d-kimuson

read_esa_post

Retrieve specific posts from esa.io using team name and post number parameters for content access and management.

Instructions

Read a post in esa.io.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamNameNomy-team
postNumberYes

Implementation Reference

  • src/server.ts:101-120 (registration)
    Registration of the MCP tool 'read_esa_post' with description, input schema, and handler function using server.tool.
    server.tool(
      "read_esa_post",
      "Read a post in esa.io.",
      {
        teamName: z.string().default(getRequiredEnv("DEFAULT_ESA_TEAM")),
        postNumber: z.number(),
      },
      async (input) =>
        await formatTool(async () => {
          const [response] = await client.readPosts(input.teamName, [
            input.postNumber,
          ])
    
          if (response === undefined) {
            throw new Error("post not found")
          }
    
          return response
        })
    )
  • The handler executes the tool logic: reads the post via ApiClient.readPosts for the given team and postNumber, checks if found, returns the post data.
      async (input) =>
        await formatTool(async () => {
          const [response] = await client.readPosts(input.teamName, [
            input.postNumber,
          ])
    
          if (response === undefined) {
            throw new Error("post not found")
          }
    
          return response
        })
    )
  • Input schema validation using Zod: teamName (string with default from env), postNumber (number).
      teamName: z.string().default(getRequiredEnv("DEFAULT_ESA_TEAM")),
      postNumber: z.number(),
    },
  • Supporting ApiClient.readPosts method that fetches post(s) using the generated ESA API client, removes body_html, returns array of post objects. Used by the tool handler.
    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
        })
      )
    }
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 for behavioral disclosure. 'Read' implies a safe operation, but the description doesn't mention authentication requirements, rate limits, error conditions, or what the output contains. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 extremely concise at just 6 words, with zero wasted language. It's front-loaded with the core action and resource, making it immediately scannable. Every word earns its place in this minimal but complete sentence.

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 tool's moderate complexity (2 parameters, no output schema, no annotations), the description is insufficiently complete. It doesn't explain parameter usage, behavioral constraints, or output format. While conciseness is good, the description lacks necessary context for effective tool selection and invocation.

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

Parameters2/5

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

Schema description coverage is 0%, so the schema provides no parameter documentation. The description mentions no parameters at all, failing to explain what 'teamName' and 'postNumber' represent or how they should be used. With 2 parameters (one required) completely undocumented, the description adds no value beyond the bare schema.

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 action ('Read') and resource ('a post in esa.io'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'read_esa_multiple_posts' which likely serves a similar reading function but for multiple posts, leaving room for improvement in sibling differentiation.

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 provides no guidance on when to use this tool versus alternatives. With siblings like 'read_esa_multiple_posts' and 'search_esa_posts' that might overlap in functionality, there's no indication of when this single-post read is preferred over batch reading or searching, leaving usage context unclear.

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

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