Skip to main content
Glama

Update event handler

update-event-handler
DestructiveIdempotent

Patch an event handler's match criteria, template, priority, or active state. Pass approve=true to approve an AI-suggested handler; approve=false to revoke approval. Only supplied fields are updated. Through an AI client, approve=true is refused, and a change to what the handler matches or books makes it a suggestion again, out of matching until a person approves it.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "is_active": false,
      "event_handler_id": "evh_01HVF8T0M2YTAY3BBNRH0V0"
    },
    "name": "update-event-handler"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoNew name. Omit to leave unchanged.
approveNoApproval shortcut: True stamps approved_by/approved_at to the current user; False clears both. Approving an AI-suggested handler also needs `expected_updated_at`.
priorityNo
is_activeNoToggle activation. False removes the handler from match-time consideration without deleting it.
descriptionNoNew description.
match_sourceNo
event_categoryNo
metadata_patchNoDeep-merged into the existing handler.metadata. Pass `{}` to leave metadata unchanged.
event_handler_idYesThe handler to update.
match_agent_typeNo
expected_updated_atNoThe handler's `updated_at` as shown when it was reviewed. Required with `approve=true` on an AI-suggested handler, so the approval covers exactly that version; a mismatch is refused with 409.
match_resource_typeNo
transaction_templateNoReplacement template. Whole-template replace — no partial patch. Omit to leave unchanged.
match_metadata_expressionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare the safety profile (destructive, idempotent, non-read-only); the description goes substantially further, disclosing partial-patch semantics ("Only supplied fields are updated"), the approval side effects, the AI-client restriction where approve=true is refused, and the demotion-to-suggestion behavior. These are exactly the non-obvious consequences an agent needs before mutating a handler that affects live event matching.

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?

Three sentences, front-loaded with the core action, then approval semantics, then the partial-update rule and AI caveat. The final sentence is dense, packing both the AI-client refusal and the re-suggestion consequence, but no sentence is 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?

For a 14-parameter mutation tool with nested template objects and no output schema, the description covers the risky semantics (replacement vs. merge, approval, demotion) well. It stops short of saying what the call returns (e.g., the updated handler) or what permissions are needed, which leaves a small gap an agent might care about after the write.

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?

With 14 parameters and only 57% schema coverage, the description does real work: it explains whole-template replacement vs. deep-merge for metadata_patch, clarifies that only supplied fields change, and explains the approve shortcut's effect on approved_by/approved_at. The match_* fields and priority/name/description remain undocumented in prose, leaving roughly a quarter of parameters understood only from their titles.

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?

The description opens with a specific verb and resource ("Patch an event handler") and enumerates the mutable aspects: match criteria, template, priority, and active state. It also carves out the approval sub-action, which cleanly separates this tool from create-event-handler and get-event-handler in the sibling list.

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?

It gives explicit conditional guidance for the tricky case: "Pass approve=true to approve an AI-suggested handler; approve=false to revoke approval," plus the rule that a change to match/book criteria demotes the handler back to a suggestion and out of matching. What's missing is any direct routing to siblings (e.g., use create-event-handler for new handlers, get-event-handler to inspect prior to patching).

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.