Skip to main content
Glama
shahabazdev

Inxmail MCP

add_to_blacklist

Block email addresses from receiving future transactional emails to honor opt-out requests and ensure compliance. Permanently prevents delivery until manually removed.

Instructions

Explicitly blacklist an email address, permanently preventing all future emails to this address. This is a write operation — the recipient will not receive any transactional or relay emails until removed via remove_from_blacklist. Use this for opt-out requests or compliance blocks. Returns the created blacklist entry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesEmail address to blacklist

Implementation Reference

  • The handler function for the 'add_to_blacklist' tool. It receives an email parameter, calls client.post('/blacklist', { email }) to add the email to the blacklist via the Inxmail API, and returns the result formatted as JSON.
    server.tool("add_to_blacklist", "Explicitly blacklist an email address, permanently preventing all future emails to this address. This is a write operation — the recipient will not receive any transactional or relay emails until removed via remove_from_blacklist. Use this for opt-out requests or compliance blocks. Returns the created blacklist entry.", {
      email: z.string().describe("Email address to blacklist"),
    }, async ({ email }) => {
      try {
        return json(await client.post("/blacklist", { email }));
      } catch (e: any) { return error(e.message); }
    });
  • The Zod input schema for the 'add_to_blacklist' tool, defining the 'email' parameter as a required string with a description.
    server.tool("add_to_blacklist", "Explicitly blacklist an email address, permanently preventing all future emails to this address. This is a write operation — the recipient will not receive any transactional or relay emails until removed via remove_from_blacklist. Use this for opt-out requests or compliance blocks. Returns the created blacklist entry.", {
      email: z.string().describe("Email address to blacklist"),
  • src/index.ts:259-265 (registration)
    The MCP tool registration where 'add_to_blacklist' is registered with the server using server.tool(). Includes the tool name, description, input schema, and handler function.
    server.tool("add_to_blacklist", "Explicitly blacklist an email address, permanently preventing all future emails to this address. This is a write operation — the recipient will not receive any transactional or relay emails until removed via remove_from_blacklist. Use this for opt-out requests or compliance blocks. Returns the created blacklist entry.", {
      email: z.string().describe("Email address to blacklist"),
    }, async ({ email }) => {
      try {
        return json(await client.post("/blacklist", { email }));
      } catch (e: any) { return error(e.message); }
    });
  • The InxmailClient.post() method used by the add_to_blacklist handler to make HTTP POST requests to the Inxmail API.
    async post<T = unknown>(path: string, body?: unknown, params?: Record<string, string | number | boolean | string[] | undefined>): Promise<T> {
      return this.request<T>("POST", path, { body, params });
    }
  • Helper functions 'json' and 'error' used by the add_to_blacklist handler to format successful responses and error messages.
    function json(data: unknown) {
      return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
    }
    
    function error(msg: string) {
      return { content: [{ type: "text" as const, text: msg }], isError: true as const };
    }
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden and succeeds: it explicitly labels this a 'write operation,' states the permanent effect, notes reversibility via the sibling tool, and documents the return value ('Returns the created blacklist entry'). Minor gap: does not address idempotency or behavior when adding an already-blacklisted address.

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?

Four sentences with zero waste: sentence 1 defines the action and effect, sentence 2 clarifies write-semantics and scope, sentence 3 provides usage context, and sentence 4 documents the return. Information is front-loaded and logically sequenced.

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

Completeness5/5

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

For a single-parameter mutation tool without output schema, the description is complete: it explains the side effects, the return value, the permanent nature of the operation, and cross-references the sibling removal tool. No gaps remain for correct invocation.

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?

Input schema has 100% description coverage ('Email address to blacklist'), so the baseline is 3. The description does not add syntax details, validation rules, or format requirements beyond what the schema already provides, but none are needed given the simple single string parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with the specific action ('Explicitly blacklist') and resource ('email address'), immediately clarifying scope with 'permanently preventing all future emails.' It distinguishes from siblings by referencing the inverse operation 'remove_from_blacklist' and differentiates from the separate 'blocklist' tool family by consistent terminology.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use the tool ('Use this for opt-out requests or compliance blocks') and contrasts it with the removal workflow ('until removed via remove_from_blacklist'). It also clarifies the impact scope ('transactional or relay emails'), helping agents decide between this and delivery-checking tools.

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/shahabazdev/inxmail-mcp'

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