Skip to main content
Glama
d-kimuson

ESA MCP Server

by d-kimuson

delete_esa_post

Remove posts from esa.io documentation by specifying the post number to delete content from your team's knowledge base.

Instructions

Delete a post in esa.io. Required parameters: postNumber.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamNameNomy-team
postNumberYes

Implementation Reference

  • src/server.ts:204-214 (registration)
    Registers the 'delete_esa_post' MCP tool with description, input schema using Zod, and an async handler function that delegates to ApiClient.deletePost.
    server.tool(
      "delete_esa_post",
      "Delete a post in esa.io. Required parameters: postNumber.",
      {
        teamName: z.string().default(getRequiredEnv("DEFAULT_ESA_TEAM")),
        postNumber: z.number(),
      },
      async (input) =>
        await formatTool(async () =>
          client.deletePost(input.teamName, input.postNumber)
        )
  • ApiClient.deletePost: Performs the HTTP DELETE request to esa.io API endpoint for deleting a specific post, using generated esaAPI function and callApi wrapper.
    async deletePost(teamName: string, postNumber: number) {
      return this.callApi(() =>
        deleteV1TeamsTeamNamePostsPostNumber(teamName, postNumber, {
          headers: {
            Authorization: `Bearer ${this.apiKey}`,
          },
        })
      ).then((response) => response.data)
    }
  • Zod input schema for delete_esa_post tool: teamName (string, optional default from env), postNumber (required number).
    {
      teamName: z.string().default(getRequiredEnv("DEFAULT_ESA_TEAM")),
      postNumber: z.number(),
  • formatTool helper: Executes tool callback, converts result to YAML-formatted text content for MCP response, handles success and errors uniformly.
    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)}`,
            },
          ],
        }
      }
    }
  • callApi private method in ApiClient: Handles API responses, checks status codes (200,201,204 success), throws ApiError on failures with appropriate messages.
    private async callApi<T extends { status: number; data: unknown }>(
      cb: () => Promise<T>
    ) {
      const response = await cb()
      if (
        response.status === 200 ||
        response.status === 201 ||
        response.status === 204
      ) {
        return response as T extends { status: 200 | 201 | 204 } ? T : never
      } else {
        if (
          typeof response.data === "object" &&
          response.data !== null &&
          "message" in response.data &&
          typeof response.data.message === "string"
        ) {
          throw new ApiError(response.data.message)
        }
    
        throw new ApiError(`Api Error: ${response.status}`)
      }
    }
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. It states 'Delete' which implies a destructive mutation, but doesn't disclose critical behavioral traits: whether deletion is permanent/reversible, authentication needs, rate limits, or error conditions. This leaves significant gaps 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 very concise—two short sentences with no wasted words. It's front-loaded with the core action. However, it could be more structured by separating purpose from parameter notes for better clarity.

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 complexity (destructive mutation), lack of annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't address return values, error handling, or important behavioral context needed for safe and effective use, leaving the agent under-informed.

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 description must compensate. It mentions 'postNumber' as required but doesn't explain what it is (e.g., a unique identifier for posts) or clarify the optional 'teamName' parameter (defaults to 'my-team'). This adds minimal semantic 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 verb ('Delete') and resource ('a post in esa.io'), making the purpose immediately understandable. It distinguishes from siblings like 'create_esa_post' and 'update_esa_post' by specifying deletion. However, it doesn't explicitly mention the platform context (esa.io) beyond the name, which slightly limits 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. It doesn't mention prerequisites (e.g., needing postNumber), exclusions, or compare to siblings like 'update_esa_post' for modification instead of deletion. The required parameter note is functional but not contextual usage advice.

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