Skip to main content
Glama
d-kimuson

ESA MCP Server

by d-kimuson

create_esa_post

Create new posts in esa.io with markdown content, tags, categories, and draft status management.

Instructions

Create a new post in esa.io. Required parameters: name. Optional parameters: body_md, tags, category, wip (default: true), message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamNameNomy-team
nameYes
body_mdNo
tagsNo
categoryNo
wipNo
messageNo

Implementation Reference

  • MCP tool registration, schema, and handler implementation for 'create_esa_post'. The handler extracts parameters, calls ApiClient.createPost, and formats the response using formatTool.
    server.tool(
      "create_esa_post",
      "Create a new post in esa.io. Required parameters: name. Optional parameters: body_md, tags, category, wip (default: true), message.",
      {
        teamName: z.string().default(getRequiredEnv("DEFAULT_ESA_TEAM")),
        name: z.string(),
        body_md: z.string().optional(),
        tags: z.array(z.string()).optional(),
        category: z.string().optional(),
        wip: z.boolean().default(true),
        message: z.string().optional(),
      },
      async (input) =>
        await formatTool(async () => {
          const { teamName: createTeamName, ...postData } = input
          return client.createPost(createTeamName, postData).then((data) => ({
            success: true,
            number: data.number,
            full_name: data.full_name,
            url: data.url,
            wip: data.wip,
            created_at: data.created_at,
            message: data.message,
            kind: data.kind,
            tags: data.tags,
            category: data.category,
            revision_number: data.revision_number,
            created_by: data.created_by,
          }))
        })
    )
  • Zod input schema for the create_esa_post tool defining parameters like teamName, name, body_md, etc.
      teamName: z.string().default(getRequiredEnv("DEFAULT_ESA_TEAM")),
      name: z.string(),
      body_md: z.string().optional(),
      tags: z.array(z.string()).optional(),
      category: z.string().optional(),
      wip: z.boolean().default(true),
      message: z.string().optional(),
    },
  • ApiClient.createPost helper function that makes the actual API call to esa.io to create the post using the generated esaAPI client.
    async createPost(teamName: string, post: PostInput) {
      return this.callApi(() =>
        postV1TeamsTeamNamePosts(
          teamName,
          {
            post,
          },
          {
            headers: {
              Authorization: `Bearer ${this.apiKey}`,
            },
          }
        )
      ).then((response) => response.data)
    }
  • formatTool utility wraps the tool callback to format output as YAML text content and handle errors appropriately for MCP response.
    export const formatTool = async (
      cb: () => unknown
    ): Promise<CallToolResult> => {
      try {
        const result = await cb()
    
        return {
          content: [
            {
              type: "text",
              text: stringify(toResponse(result)),
            },
          ],
        }
      } catch (error) {
        console.error("Error in formatTool:", error)
    
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error: ${error instanceof Error ? `${error.name}: ${error.message}` : String(error)}`,
            },
          ],
        }
      }
    }
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 creates a post but lacks critical details: whether it requires authentication, what happens on success/failure, if it's idempotent, or any rate limits. This is a significant gap for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and efficiently lists parameters in a single sentence. There's no wasted text, but it could be slightly more structured (e.g., separating purpose from parameter details) for better readability.

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?

For a mutation tool with 7 parameters, 0% schema description coverage, no annotations, and no output schema, the description is inadequate. It misses behavioral context, parameter details, and output expectations, leaving the agent under-informed about how to use this tool effectively.

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 lists required and optional parameters, adding some meaning beyond the input schema, which has 0% description coverage. However, it doesn't explain parameter semantics (e.g., what 'wip' means, format for 'body_md' or 'category'), so it only partially compensates for the schema gap. With 7 parameters and low coverage, this is minimal compensation.

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 ('Create a new post') and resource ('in esa.io'), which is specific and unambiguous. However, it doesn't differentiate from sibling tools like 'update_esa_post' or 'delete_esa_post' beyond the basic verb, missing 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 provides no guidance on when to use this tool versus alternatives like 'update_esa_post' or 'read_esa_post'. It lists required and optional parameters but offers no context about prerequisites, typical use cases, or exclusions, leaving the agent to infer 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/d-kimuson/esa-mcp-server'

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