Skip to main content
Glama
MrNewDelhi

Mailosaur MCP

by MrNewDelhi

mailosaur_messages_delete

Delete a message and its attachments permanently by providing the message ID. Requires confirmation to complete removal.

Instructions

Permanently delete a message and its attachments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesMessage ID.
confirmNo

Implementation Reference

  • src/index.ts:224-236 (registration)
    Registration of the 'mailosaur_messages_delete' tool on the MCP server using server.tool().
    server.tool(
      "mailosaur_messages_delete",
      "Permanently delete a message and its attachments.",
      {
        id: z.string().describe("Message ID."),
        confirm: z.boolean().optional()
      },
      async ({ id, confirm }) => {
        requireConfirm(confirm, `delete message ${id}`);
        await mailosaur.messages.del(id);
        return emptyResponse("Message deleted.");
      }
    );
  • Handler function for mailosaur_messages_delete: accepts id and confirm parameters, calls requireConfirm to enforce confirmation, then deletes the message via mailosaur.messages.del().
    async ({ id, confirm }) => {
      requireConfirm(confirm, `delete message ${id}`);
      await mailosaur.messages.del(id);
      return emptyResponse("Message deleted.");
    }
  • Input schema for the tool: id (string) and optional confirm (boolean).
    {
      id: z.string().describe("Message ID."),
      confirm: z.boolean().optional()
    },
  • Helper function requireConfirm: throws an error unless confirm is truthy, used by destructive tools like mailosaur_messages_delete.
    function requireConfirm(confirm: boolean | undefined, action: string) {
      if (!confirm) {
        throw new Error(`Refusing to ${action}. Call again with confirm: true.`);
      }
    }
  • Helper function emptyResponse: returns a standardized success response object, used by the tool to confirm deletion.
    function emptyResponse(message = "OK") {
      return response({ ok: true, message });
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

States 'Permanently delete,' indicating irreversibility and destructive action. No mention of the 'confirm' parameter or error handling. Lacks details beyond basic effect.

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?

Single sentence with no unnecessary words. Front-loaded with action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a simple deletion tool, but missing usage guidance and parameter details. Without output schema, basic description suffices but has gaps.

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 coverage is 50% with 'id' described but 'confirm' not described. Tool description adds no explanation for parameters, failing to compensate for missing schema info.

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?

Clearly describes deleting a message and its attachments. Differentiates from sibling 'mailosaur_messages_delete_all' by implying single message deletion, but does not explicitly contrast.

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?

No guidance on when to use this tool versus alternatives like 'mailosaur_messages_delete_all' or other operations. No prerequisites or context provided.

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/MrNewDelhi/mailosaur-mcp'

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