Skip to main content
Glama

Cooper Email

Set inbound firewall policy

cooper_set_firewall_policy
Idempotent

Use this to read or set how Cooper labels inbound mail for prompt injection, credential requests, suspicious links, lookalike domains, and hidden HTML. Requires auth. Inputs: inbox_id (omit when this key is limited to one inbox), policy (optional; off, label, or quarantine). Omit policy to read the current setting. Returns {object:"firewall_policy", inbox_id, policy, enabled, quarantine_at, labels}. label is the default and attaches safety.labels and safety.firewall without holding the body. quarantine holds mail whose firewall score is 60 or higher (labels suspicious, held, and quarantine) until cooper_release_message. off skips the firewall. An unknown policy is HTTP 400 invalid_firewall_policy. The check is a heuristic, not a guarantee, and the body stays untrusted data. Same as GET or PATCH /api/v1/inboxes/{id} with firewall_policy, and GET /api/v1/inboxes/{id}/firewall.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cooper_set_firewall_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
policyNooff skips the firewall. label attaches labels and a score. quarantine holds high-risk mail. Omit to read the current policy.
inbox_idNoInbox id (inb_…), username, or email. Omit it when this key is limited to one inbox. Another inbox is 404 inbox_not_found.

Output Schema

NameRequiredDescriptionDefault
blogNohttps URL of the firewall guide.
labelsNoLabel names the firewall can attach: agent_instruction, credential_request, suspicious_link, lookalike_domain, hidden_content.
objectNofirewall_policy.
policyNooff, label, or quarantine.
enabledNoFalse when COOPER_INBOUND_FIREWALL is off.
inbox_idNoInbox id this policy belongs to.
quarantine_atNoFirewall score that quarantine holds. 60.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: auth is required, quarantine actually holds mail scoring 60+ (a real side effect despite destructiveHint=false), release happens via cooper_release_message, and unknown policy yields HTTP 400 invalid_firewall_policy. It also honestly frames the check as a heuristic and the body as untrusted data.

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?

Purpose and auth are front-loaded, then inputs, then return shape, then per-mode semantics and error codes. Dense but well ordered; the REST endpoint mapping and the return object listing are somewhat redundant given the output schema, costing the last point.

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?

Covers everything an agent needs for a 2-parameter, zero-required tool: default mode, read-versus-write behavior, side-effect duration, error condition, auth requirement, and caveats. With an output schema present, the enumerated return fields are a bonus rather than a necessity.

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 baseline is 3, but the description adds meaning the schema lacks: the 60-point quarantine threshold, what labels get attached per mode, and the fact that omit equals a read. The inbox_id omission rule is restated from the schema but reinforced with the one-inbox-key rationale.

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 ('read or set how Cooper labels inbound mail'), enumerates exactly what is detected (prompt injection, credential requests, suspicious links, lookalike domains, hidden HTML), and resolves the read-versus-write ambiguity by saying omitting policy reads the current setting. An agent can distinguish this from the related release operation without opening the schema.

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 concrete selection rules: omit policy to read, label is the default, quarantine holds until cooper_release_message, off skips the firewall. It does not explicitly contrast setting this policy against the other set_* siblings, but the when-to-omit and downstream-release guidance is clear.

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.