Skip to main content
Glama
Mailbuttons MCP Server

Mailbuttons MCP Server

Official
by mailbuttons

Generate a mailbuttons.policy.json

mailbuttons_generate_policy
Idempotent

Generates a valid MailPolicy JSON file from an allow/block list, defaulting to bounce and capped at internal sending. Use it to define which senders an agent accepts and how far it may send.

Instructions

Build-time, sandbox-only. Turns an allow/block description into a valid MailPolicy and writes mailbuttons.policy.json. Default-bounce (closed by default), capped at internal send, with a prompt-injection content guard. Never invents senders and never generates external-send capability — going external is a human promotion.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "allow": "<allow>",
      "sendScope": "<sendScope>"
    },
    "name": "mailbuttons_generate_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
allowYesSenders the agent should accept mail from. Each entry is matched by address OR domain. Only list senders the user actually named — never invent any.
blockNoSenders to explicitly reject. With defaultAction 'bounce' anything not allowlisted is already rejected, so these are usually redundant; they are surfaced as warnings rather than silently expanding the policy.
outPathNoWhere to write the policy. Defaults to ./mailbuttons.policy.json.
sendScopeYesHow far the agent may send. 'internal_only' grants send_internal to allowed senders; 'none' grants no send capability. External send is NEVER generated — it requires a human promotion.
contentGuardsNoExtra body-regex guards to add on top of the default prompt-injection guard.

Output Schema

NameRequiredDescriptionDefault
pathYesAbsolute path the policy file was written to.
policyYesThe generated MailPolicy, exactly as written to disk.
warningsYesNon-fatal notes (e.g. redundant block entries, empty allowlist).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare the mutation profile (readOnlyHint=false, idempotentHint=true, openWorldHint=false); the description goes well beyond them by disclosing the generated policy's semantics: default-bounce / closed-by-default, send capability capped at internal, a prompt-injection content guard, and the invariant that senders are never invented. The 'never generates external-send' guarantee is exactly the kind of constraint an agent needs before calling a policy generator.

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 short sentences, front-loaded with the hard constraint ('Build-time, sandbox-only') and then the output artifact. Every clause carries distinct information — defaults, scope cap, guard, and anti-invention invariants — with no filler.

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

Completeness4/5

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

An output schema exists, so return values need not be explained, and the description covers the key policy semantics and safety invariants for a 5-parameter generation tool. It is slightly thin on operational behavior around writing the file (overwrite behavior, what happens when block entries produce warnings), though idempotentHint covers part of that.

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?

Schema description coverage is 100%, so the schema already documents allow, block, outPath, sendScope and contentGuards in detail. The description reinforces sendScope by stating the internal cap and the no-external rule, but adds little about the individual parameters beyond what the schema already says; baseline 3 applies.

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?

States a specific verb and output: it turns an allow/block description into a valid MailPolicy and writes mailbuttons.policy.json. The scope qualifier 'build-time, sandbox-only' plus the contrast with human promotion ('going external is a human promotion') separates it from siblings like mailbuttons_request_promotion and mailbuttons_propose_sender.

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

Usage Guidelines4/5

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

Gives clear operating context ('build-time, sandbox-only') and implicitly routes external-send requests away from this tool by stating that external is a human promotion. It does not explicitly name the sibling to use for promotion, so it stops short of a full when/when-not/alternative statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.