Skip to main content
Glama

Mailrun Agent Identity

Preview the email agent

preview_email_agent

Run the hosted email agent on a sample message without sending, drafting or saving anything: returns the decision, reason, reply text, matched playbook rules, the judge, checker and Jev results, would_send (whether auto mode would send it to an authenticated sender) and caps (every downgrade). config proposes changes to instructions, playbook_markdown, screening, ai_disclosure, sensitive_topics or sign_off, validated as update_email_agent validates them but never saved; omitted fields use the saved settings. Needs agent:email.draft too. At most 30 previews per identity per day (rate_limited); the first 20 per account each billing month are free, later ones cost the reply price (usage_cents) under the email agent spend cap (email_agent_spend_cap_reached). A failed preview is never charged.

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": {
      "identity_id": "<identity_id>",
      "from": "<from>",
      "text": "<text>"
    },
    "name": "preview_email_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromYesSample sender address.
textYesSample message body, plain text.
configNoProposed settings to preview instead of the saved ones; never saved.
subjectNoSample subject.
identity_idYesIdentity id from list_identities.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare the generic flag set (readOnlyHint=false, destructiveHint=false, idempotentHint=false), so the description carries the real behavioral burden and does: billing behavior (first 20 per account per month free, then usage_cents under the spend cap), the rate_limited and email_agent_spend_cap_reached conditions, and the guarantee that a failed preview is never charged. That is exactly the kind of non-obvious side effect an agent needs before calling. It stops short of describing output shape or latency, which keeps it from a 5.

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 core promise (preview without side effects) is front-loaded and the return-field enumeration follows logically. It is one dense semicolon-chained block, though, and the billing/rate-limit clause is buried mid-paragraph rather than broken out, which costs a little scannability.

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?

There is no output schema, and the description compensates fully by naming the returned fields (decision, reason, reply text, matched playbook rules, judge/checker/Jev results, would_send, caps). With five parameters including a nested config object, it also covers validation and failure modes (email_agent_playbook_invalid, hosted_content_rejected, validation_failed) and the auth requirement, so an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the nested config fields are richly documented, so the baseline is 3. The description earns above baseline by explaining the semantics the schema cannot: that config is a proposed override set rather than persisted values, that omitted fields fall back to saved settings, that validation mirrors update_email_agent, and that nothing is written.

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 resource ('Run the hosted email agent on a sample message') and immediately pins the scope with 'without sending, drafting or saving anything'. It then enumerates the return payload, so an agent can tell it apart from update_email_agent or send_email without opening any schema.

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 frames this as the dry-run counterpart to update_email_agent by saying config is 'validated as update_email_agent validates them but never saved' and that 'omitted fields use the saved settings'. It also gives the operational preconditions an agent must weigh: the agent:email.draft scope requirement, the 30-per-identity daily ceiling, and the free-then-paid quota.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources