Skip to main content
Glama

create_webhook_endpoint

Idempotent

Create a webhook: name, public HTTPS URL, events (inbound.received, inbound.action.requested, inbound.action.completed, inbound.pages_ready, inbound.keywords_matched) and optional keyword rules (literal terms, any/all, exclusions). Active on save. Returns the whsec_ signing secret once; hand it only to the operator's secure configuration, never logs or mail content. Requires explicit user intent for the URL. Agent keys must use their own agent_id and environment; member keys may use agent_id:null for account scope. Requires webhook.manage. Uses the same bounded control plane and tenant/agent/Live-Sandbox authorization as /api/v1/webhooks/endpoints. Reuse the exact idempotency_key and input after an uncertain mutation. Webhook docs: https://mailbox.bot/docs/webhooks.

Input Schema

NameRequiredDescriptionDefault
urlYesPublic HTTPS URL on port 443 (no credentials, fragment or private host) that receives the signed POSTs. Set or change it only on the operator's explicit instruction.
nameYesLabel shown in the dashboard and delivery log.
rulesYesUp to 10 keyword rules, each with a unique id: source (envelope, letter for the contents, or any), match (any or all), 1–20 terms and optional exclude_terms. inbound.keywords_matched fires when a rule matches.
agent_idYesAgent keys: your own agent id. Member keys: an agent id, or null for account scope.
environmentYeslive or test. Agent keys must use their own environment; an endpoint only receives events from its environment.
event_typesYesEvents to deliver (1–32, unique). Inbound mail: inbound.received, inbound.action.requested, inbound.action.completed, inbound.pages_ready, inbound.keywords_matched. Outbound mail: mail.pending_approval, mail.submitted, mail.ready, mail.mailed, mail.delivered, mail.failed, mail.cancelled. Batches: batch.submitted, batch.completed, batch.partially_completed, batch.failed, batch.cancelled, batch.piece.scanned, batch.piece.confirmed.
idempotency_keyYesA new UUID for this one intent; reuse it only to retry the identical request.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / event_types / description
      Previous value: -"Events to deliver (1–32, unique). Inbound mail: inbound.received, inbound.action.requested, inbound.action.completed, inbound.pages_ready, inbound.keywords_matched. Outbound mail: mail.pending_approval, mail.submitted, mail.ready, mail.mailed, mail.delivered, mail.failed, mail.cancelled. Batches: batch.submitted, batch.completed, batch.partially_completed, batch.failed, batch.cancelled."New value: +"Events to deliver (1–32, unique). Inbound mail: inbound.received, inbound.action.requested, inbound.action.completed, inbound.pages_ready, inbound.keywords_matched. Outbound mail: mail.pending_approval, mail.submitted, mail.ready, mail.mailed, mail.delivered, mail.failed, mail.cancelled. Batches: batch.submitted, batch.completed, batch.partially_completed, batch.failed, batch.cancelled, batch.piece.scanned, batch.piece.confirmed."
    • changedInput schema / properties / event_types / items / enum
      Previous value: -[
      -  "inbound.received",
      -  "inbound.action.requested",
      -  "inbound.action.completed",
      -  "inbound.pages_ready",
      -  "inbound.keywords_matched",
      -  "mail.pending_approval",
      -  "mail.submitted",
      -  "mail.ready",
      -  "mail.mailed",
      -  "mail.delivered",
      -  "mail.failed",
      -  "mail.cancelled",
      -  "batch.submitted",
      -  "batch.completed",
      -  "batch.partially_completed",
      -  "batch.failed",
      -  "batch.cancelled"
      -]New value: +[
      +  "inbound.received",
      +  "inbound.action.requested",
      +  "inbound.action.completed",
      +  "inbound.pages_ready",
      +  "inbound.keywords_matched",
      +  "mail.pending_approval",
      +  "mail.submitted",
      +  "mail.ready",
      +  "mail.mailed",
      +  "mail.delivered",
      +  "mail.failed",
      +  "mail.cancelled",
      +  "batch.submitted",
      +  "batch.completed",
      +  "batch.partially_completed",
      +  "batch.failed",
      +  "batch.cancelled",
      +  "batch.piece.scanned",
      +  "batch.piece.confirmed"
      +]
    • changedOutput schema / properties / result / properties / endpoint / properties / event_types / items / enum
      Previous value: -[
      -  "inbound.received",
      -  "inbound.action.requested",
      -  "inbound.action.completed",
      -  "inbound.pages_ready",
      -  "inbound.keywords_matched",
      -  "mail.pending_approval",
      -  "mail.submitted",
      -  "mail.ready",
      -  "mail.mailed",
      -  "mail.delivered",
      -  "mail.failed",
      -  "mail.cancelled",
      -  "batch.submitted",
      -  "batch.completed",
      -  "batch.partially_completed",
      -  "batch.failed",
      -  "batch.cancelled"
      -]New value: +[
      +  "inbound.received",
      +  "inbound.action.requested",
      +  "inbound.action.completed",
      +  "inbound.pages_ready",
      +  "inbound.keywords_matched",
      +  "mail.pending_approval",
      +  "mail.submitted",
      +  "mail.ready",
      +  "mail.mailed",
      +  "mail.delivered",
      +  "mail.failed",
      +  "mail.cancelled",
      +  "batch.submitted",
      +  "batch.completed",
      +  "batch.partially_completed",
      +  "batch.failed",
      +  "batch.cancelled",
      +  "batch.piece.scanned",
      +  "batch.piece.confirmed"
      +]
  2. Changed5 schema fields changed
    • changedInput schema / properties / event_types / description
      Previous value: -"Events to deliver (1–16, unique): inbound.received, inbound.action.requested, inbound.action.completed, inbound.pages_ready, inbound.keywords_matched."New value: +"Events to deliver (1–32, unique). Inbound mail: inbound.received, inbound.action.requested, inbound.action.completed, inbound.pages_ready, inbound.keywords_matched. Outbound mail: mail.pending_approval, mail.submitted, mail.ready, mail.mailed, mail.delivered, mail.failed, mail.cancelled. Batches: batch.submitted, batch.completed, batch.partially_completed, batch.failed, batch.cancelled."
    • changedInput schema / properties / event_types / items / enum
      Previous value: -[
      -  "inbound.received",
      -  "inbound.action.requested",
      -  "inbound.action.completed",
      -  "inbound.pages_ready",
      -  "inbound.keywords_matched"
      -]New value: +[
      +  "inbound.received",
      +  "inbound.action.requested",
      +  "inbound.action.completed",
      +  "inbound.pages_ready",
      +  "inbound.keywords_matched",
      +  "mail.pending_approval",
      +  "mail.submitted",
      +  "mail.ready",
      +  "mail.mailed",
      +  "mail.delivered",
      +  "mail.failed",
      +  "mail.cancelled",
      +  "batch.submitted",
      +  "batch.completed",
      +  "batch.partially_completed",
      +  "batch.failed",
      +  "batch.cancelled"
      +]
    • changedInput schema / properties / event_types / maxItems
      Previous value: -16New value: +32
    • changedOutput schema / properties / result / properties / endpoint / properties / event_types / items / enum
      Previous value: -[
      -  "inbound.received",
      -  "inbound.action.requested",
      -  "inbound.action.completed",
      -  "inbound.pages_ready",
      -  "inbound.keywords_matched"
      -]New value: +[
      +  "inbound.received",
      +  "inbound.action.requested",
      +  "inbound.action.completed",
      +  "inbound.pages_ready",
      +  "inbound.keywords_matched",
      +  "mail.pending_approval",
      +  "mail.submitted",
      +  "mail.ready",
      +  "mail.mailed",
      +  "mail.delivered",
      +  "mail.failed",
      +  "mail.cancelled",
      +  "batch.submitted",
      +  "batch.completed",
      +  "batch.partially_completed",
      +  "batch.failed",
      +  "batch.cancelled"
      +]
    • changedOutput schema / properties / result / properties / endpoint / properties / event_types / maxItems
      Previous value: -16New value: +32
  3. Changed7 schema fields changed
    • addedInput schema / properties / agent_id / description
      Added value: +"Agent keys: your own agent id. Member keys: an agent id, or null for account scope."
    • addedInput schema / properties / environment / description
      Added value: +"live or test. Agent keys must use their own environment; an endpoint only receives events from its environment."
    • addedInput schema / properties / event_types / description
      Added value: +"Events to deliver (1–16, unique): inbound.received, inbound.action.requested, inbound.action.completed, inbound.pages_ready, inbound.keywords_matched."
    • addedInput schema / properties / idempotency_key / description
      Added value: +"A new UUID for this one intent; reuse it only to retry the identical request."
    • addedInput schema / properties / name / description
      Added value: +"Label shown in the dashboard and delivery log."
    • addedInput schema / properties / rules / description
      Added value: +"Up to 10 keyword rules, each with a unique id: source (envelope, letter for the contents, or any), match (any or all), 1–20 terms and optional exclude_terms. inbound.keywords_matched fires when a rule matches."
    • addedInput schema / properties / url / description
      Added value: +"Public HTTPS URL on port 443 (no credentials, fragment or private host) that receives the signed POSTs. Set or change it only on the operator's explicit instruction."
  4. Changed5 schema fields changed
    • changedInput schema / properties / event_types / items / enum
      Previous value: -[
      -  "inbound.received",
      -  "inbound.scan_available",
      -  "inbound.context_ready",
      -  "inbound.rule_matched",
      -  "inbound.action_completed",
      -  "inbound.action_failed",
      -  "mail.submitted",
      -  "mail.ready",
      -  "mail.mailed",
      -  "mail.delivered",
      -  "mail.failed",
      -  "mail.cancelled",
      -  "mail.pending_approval"
      -]New value: +[
      +  "inbound.received",
      +  "inbound.action.requested",
      +  "inbound.action.completed",
      +  "inbound.pages_ready",
      +  "inbound.keywords_matched"
      +]
    • changedOutput schema / properties / result / properties / endpoint / properties / event_types / items / enum
      Previous value: -[
      -  "inbound.received",
      -  "inbound.scan_available",
      -  "inbound.context_ready",
      -  "inbound.rule_matched",
      -  "inbound.action_completed",
      -  "inbound.action_failed",
      -  "mail.submitted",
      -  "mail.ready",
      -  "mail.mailed",
      -  "mail.delivered",
      -  "mail.failed",
      -  "mail.cancelled",
      -  "mail.pending_approval"
      -]New value: +[
      +  "inbound.received",
      +  "inbound.action.requested",
      +  "inbound.action.completed",
      +  "inbound.pages_ready",
      +  "inbound.keywords_matched"
      +]
    • changedOutput schema / properties / result / properties / endpoint / properties / status / enum
      Previous value: -[
      -  "pending_verification",
      -  "active",
      -  "paused"
      -]New value: +[
      +  "active",
      +  "paused"
      +]
    • removedOutput schema / properties / result / properties / endpoint / properties / verified_at
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "format": "date-time",
      -      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • changedOutput schema / properties / result / properties / endpoint / required
      Previous value: -[
      -  "name",
      -  "url",
      -  "agent_id",
      -  "environment",
      -  "event_types",
      -  "rules",
      -  "id",
      -  "member_id",
      -  "status",
      -  "revision",
      -  "verified_at",
      -  "created_at",
      -  "updated_at",
      -  "last_delivery_at",
      -  "last_http_status",
      -  "failure_count",
      -  "signing_key_prefix",
      -  "previous_key_expires_at"
      -]New value: +[
      +  "name",
      +  "url",
      +  "agent_id",
      +  "environment",
      +  "event_types",
      +  "rules",
      +  "id",
      +  "member_id",
      +  "status",
      +  "revision",
      +  "created_at",
      +  "updated_at",
      +  "last_delivery_at",
      +  "last_http_status",
      +  "failure_count",
      +  "signing_key_prefix",
      +  "previous_key_expires_at"
      +]
  5. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: endpoint is active on save, the whsec_ secret is returned exactly once and must never be logged or sent in mail, the control plane and tenant/agent/Live-Sandbox authorization model is named, and the retry semantics for uncertain mutations are spelled out. Annotations only cover idempotency/read-only hints, so this adds substantial operational context.

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 create action and its inputs, then layers constraints. It is dense but every clause carries operational weight; the auth-scoping and control-plane sentences could be trimmed without loss.

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?

With an output schema present and annotations covering safety/idempotency, the remaining burden is permissions, secret handling, scoping and retry behavior — all addressed. An agent has what it needs to invoke this correctly without further docs.

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 coverage is 100%, so the baseline is 3. The description restates the rule shape (literal terms, any/all, exclusions) and the agent_id/environment scoping already documented in the schema, and notably lists only the five inbound event types while the schema supports 19 — so the description adds little and is slightly narrower than the schema.

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 ('Create a webhook') and immediately enumerates the defining inputs (name, public HTTPS URL, events, keyword rules), which separates it from update_webhook_endpoint and list_webhook_endpoints in the sibling set.

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 preconditions: 'Requires explicit user intent for the URL', 'Requires webhook.manage', agent vs member key scoping, and 'Reuse the exact idempotency_key and input after an uncertain mutation'. It lacks an explicit contrast with update_webhook_endpoint (when to create vs when to modify), so it stops short of full alternative routing.

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.