Skip to main content
Glama

Webform Handler Create

webform_handler_create

Create and attach a webform handler (email, webhook, etc.) to a Drupal webform, since handlers are plugins in webform config and cannot be created via JSON:API.

Instructions

Create a webform handler (email, remote post, etc.).

A handler is a plugin held inside the webform's own configuration -- there is no webform_handler entity and JSON:API cannot POST one. This builds the plugin through plugin.manager.webform.handler and attaches it with Webform::addWebformHandler(), which is the same sequence Webform's own add-handler form runs.

id is the handler's id within the webform (email_confirmation, not email); handler_type is the plugin (email, webhook, auto_save, ...). configuration supplies plugin settings, which are merged over the plugin's defaults -- the reply echoes the whole resulting configuration so you can see what the defaults filled in.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
labelYes
webform_idYes
handler_typeYes
configurationNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the underlying mechanism (plugin.manager.webform.handler + Webform::addWebformHandler()), clarifies that this mirrors Webform's own add-handler form, and explains that configuration is merged over plugin defaults and the resulting configuration is echoed back. This gives the agent substantial behavioral context beyond the schema.

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 description is front-loaded with the core purpose, then adds mechanism and parameter semantics in logical order. It is slightly longer than a minimal description, but every paragraph earns its place by clarifying a genuinely complex creation process.

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?

Given the tool's complexity, missing annotations, zero schema description coverage, and an output schema that already covers return shape, the description is nearly complete. It covers purpose, mechanism, key parameter distinctions, and configuration merge behavior. Minor gaps remain around permissions and the label/webform_id semantics, but the essential invocation context is present.

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 0%, so the description must compensate. It meaningfully explains the three most ambiguous parameters: id is the handler id within the webform (not the plugin id), handler_type is the plugin type, and configuration supplies plugin settings that are merged over defaults. It does not explain label or webform_id, but those are comparatively self-evident.

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 webform handler') and immediately distinguishes it from siblings by explaining that handlers are plugins inside a webform's configuration, not standalone entities, and that JSON:API cannot POST one. An agent can clearly tell this apart from webform_create or webform_handler_update without opening another 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?

Provides clear context for when this tool is the right mechanism: there is no webform_handler entity and JSON:API cannot POST one, so this tool builds the plugin through the handler manager and attaches it to the webform. It does not explicitly name sibling alternatives such as webform_handler_update or explain when to use those instead, so it stops short of a full when/when-not/alternatives treatment.

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

Deploy Server

Other Tools