Skip to main content
Glama

Mailrun Agent Identity

Update email agent settings

update_email_agent
Idempotent

Change the identity's hosted email agent settings; only the fields sent change, and settings take effect on the next inbound message. Every refusal leaves the previous settings in force: unknown fields and bad values are validation_failed, a playbook that does not parse is email_agent_playbook_invalid (each error with its rule), high-risk owner text is hosted_content_rejected. Any mode but off also needs the agent to be available, a paid plan with email and an email address on the identity. Returns the settings (as get_email_agent).

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>"
    },
    "name": "update_email_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNooff (default): the agent does nothing. draft: it writes replies as drafts for you to send. auto: it sends replies that pass every check and drafts the rest. Any mode but off needs the hosted email agent to be available (email_agent_unavailable otherwise) with usage billing active (email_agent_billing_inactive), a paid plan with email (email_agent_not_in_plan) and an email address on the identity (email_not_provisioned). While it is draft or auto, saves also need the agent:email.draft or agent:email.send scope; turning it on is refused past due (account_past_due).
limitsNoReply ceilings; only the limits sent change.
sign_offNoOptional plain-text name or short closing added to every hosted email agent reply before the AI disclosure line. On save with instructions, null or blank copies the identity's current name if it meets these rules; otherwise replies have no sign-off. Later renames do not change stored sign-offs. Up to 200 characters and at most 3 non-blank lines; no links, link schemes like https: or mailto:, web addresses, IP addresses or email addresses. Invalid values are refused with validation_failed naming sign_off. Screened on save with the instructions, playbook and holding reply; high-risk content is refused with hosted_content_rejected and nothing changes.
allowlistNoAddresses (pat@example.com) and @domain entries (@example.com) the agent answers when answer_scope is allowlist. Replaces the whole list. Max 200.
screeningNostandard (default): suspected manipulation of the agent escalates to a person. relaxed: only high-severity manipulation escalates; the rest becomes drafts. Before relaxing it, tell the owner what it weakens and get their confirmation. Changes are logged.
identity_idYesIdentity id from list_identities.
answer_scopeNoanyone (default), or allowlist: only senders matching allowlist.
instructionsNoWho the agent is, what it handles, its tone. Required unless mode is off. Screened on save with the playbook, holding reply and sign-off: high-risk content is refused hosted_content_rejected and nothing changes.
ai_disclosureNoAdd a line to each reply saying an AI assistant wrote it (default true). Before turning it off, warn the owner that AI disclosure duties then become theirs and get their confirmation.
holding_replyNoOptional fixed plain text sent when a message is escalated in auto mode, e.g. "Thanks, a person will reply soon."
escalation_emailNoWhere escalation and draft notices go; null uses the account owner's email. Only the owner's email or an address on the identity's own email domain.
sensitive_topicsNoescalate (default): payments, account changes, legal threats, complaints and medical questions go to a person. playbook_only: answer them from the playbook only.
playbook_markdownNoPer-topic rules: one "## Title" per rule, a "When:" line, and exactly one of "Answer exactly:" (a > blockquote, sent verbatim, up to 2,000 characters), "Guidance: ...", "Escalate: true" or "Never answer: true". Up to 50 rules. A playbook that does not parse is refused email_agent_playbook_invalid with every error by rule, and the previous playbook stays. null clears it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Well beyond the annotations (readOnly=false, idempotent=true, destructive=false), the description discloses atomicity ('every refusal leaves the previous settings in force'), the full refusal taxonomy with error codes (validation_failed, email_agent_playbook_invalid with per-rule errors, hosted_content_rejected), prerequisite gating, required scopes, and past-due refusal. That is exactly the operational context an agent needs before a 13-param mutation.

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?

Front-loaded with the core change semantics before the error taxonomy, and every sentence carries information (effect timing, atomicity, error codes, prerequisites). It is dense — long semicolon-chained clauses packed with error identifiers — but not padded; a small readability cost for a high-complexity tool.

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 13-parameter, nested-object mutation with no output schema, the description covers return values ('Returns the settings (as get_email_agent)'), timing of effect, atomicity on failure, and the conditional prerequisites. Nothing an agent needs to call it correctly appears missing.

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%, so the parameter baseline is 3; the description still adds the cross-cutting semantic that only sent fields change and that partial failures revert everything, which shapes how the agent should batch fields. It does not restate per-field rules already in the schema, which is appropriate.

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 ('Change the identity's hosted email agent settings') plus two distinguishing semantics: PATCH-style partial update ('only the fields sent change') and deferred effect ('take effect on the next inbound message'). It also positions itself against get_email_agent by noting the return shape matches that tool.

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?

The partial-update framing tells the agent when to use this rather than a full replace, and the prerequisites ('any mode but off also needs the agent to be available, a paid plan with email and an email address') tell it when the call will be refused. It references get_email_agent for reads but does not explicitly say to use preview_email_agent before applying changes, so the alternates are implied rather than enumerated.

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