Skip to main content
Glama

Create Webhook

create_webhook
Destructive

Creates a webhook: the survey's events are POSTed as JSON to your https URL from then on. Standing configuration with side effects — confirm with the user first: call WITHOUT confirm for a PREVIEW, then again with confirm:true. The preview creates no webhook, but sends one sample HTTPS POST to targetURL to check reachability — preview only against addresses you own or trust. Health grading: 2xx = healthy, 0 = unreachable, other codes = the endpoint refused the sample. An unreachable target (0) blocks creation unless force:true is passed; other non-2xx answers warn but create. eventType: ResponseRecieved (a response was submitted or updated — payload carries the answers) or SurveyPublished (the survey was (re)started). Personal/contact fields are NEVER sent — only question answers: includeFields accepts question variable names as returned by get_survey (Q1, Q3.2, …); left empty, it is expanded to the explicit list of ALL question variables, so contact columns stay out of the payload by construction. Verified by readback: the created hook is re-read from the survey's webhook list before success is reported. Fire a sample with test_webhook and watch health with get_webhook_deliveries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesSurvey publication code — the 8-character code from the survey's public link (e.g. 1a2b3c4d). Returned by list_surveys.
forceNotrue = create even when the health ping says the target is UNREACHABLE (statusCode 0). Use only when the user insists, e.g. the receiver goes live later.
confirmNoOmit or false → preview: no webhook is created, but one sample HTTPS POST is sent to targetURL to check reachability. true → actually create the webhook (only after the user explicitly agreed).
eventTypeYesEvent to subscribe to: ResponseRecieved or SurveyPublished (exact spelling — the historic 'Recieved' is intentional).
targetURLYesAbsolute https:// URL the events are POSTed to. Plain http is refused.
useCustomIDNotrue = use the questions' custom IDs as payload property names.
answersAsTextNotrue = push answers as labels instead of numeric codes.
includeFieldsNoQuestion variables to include in ResponseRecieved payloads, by the names get_survey returns (e.g. ["Q1","Q2.3"]). Omit for ALL question variables. Contact/unknown names are refused.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageNoWhat the call did, verified, refused or previewed — the complete human-readable outcome.
previewNotrue when the call was a preview (confirm not passed): nothing was changed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the coarse profile (destructive, non-idempotent, open-world); the description adds genuinely non-obvious behavioral detail: the preview performs a real outbound HTTPS POST, health grading semantics (2xx healthy, 0 unreachable, others refused), that unreachable blocks creation unless force, that other non-2xx warn but still create, readback verification before success, and the PII guarantee that contact fields are never sent.

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 purpose, then organized logically by preview/create flow, health grading, events, payload scoping, and verification. It is long, but the density is justified for a mutating tool with a non-obvious preview side effect; minor redundancy around the confirm flow keeps it from a 5.

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?

An output schema exists so return values need not be described, and the description covers everything else an agent needs: the confirm/force decision rules, the side effect of the preview call, event semantics, payload inclusion rules, and success verification. Nothing material is missing for correct invocation.

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 100% schema description coverage the baseline is 3, and the description adds meaning beyond the schema: what eventType values mean in terms of payload content, that includeFields defaults to ALL question variables when empty, and the 'Recieved' spelling rationale. It reinforces rather than merely repeats the schema, though it stops short of explaining useCustomID/answersAsText interactions.

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?

Opens with a specific verb+resource ('Creates a webhook') and immediately states the durable effect ('the survey's events are POSTed as JSON to your https URL from then on'). This is unmistakably distinct from delete_webhook, list_webhooks, test_webhook, and get_webhook_deliveries among the siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit two-step protocol (call without confirm for a preview, then with confirm:true), states when to use force:true, and routes the agent to complementary tools ('Fire a sample with test_webhook and watch health with get_webhook_deliveries'). It also names the condition that should block creation (unreachable target).

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