Skip to main content
Glama

Preview Webhook Rules

preview_webhook_rules
Read-only

Check rules without sending anything. Runs them on one event (a stored delivery_id, or event plus payload) and returns what each rule would send, with filter errors, missing fields, and invalid Live Activity content. Without an event, runs them on the webhook's stored deliveries from the last 7 days and returns how often each rule would have fired, so you can catch noisy rules before saving. Pass rules to test edits; leave them out to test the webhook's current rules.

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": "preview_webhook_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
eventNoFor a GitHub payload, the X-GitHub-Event name, such as workflow_run. GitLab payloads name it themselves.
rulesNoRules, at most 25. Each picks events, optionally filters them with a CEL `if`, and runs one action: push_notification, dismiss_push_notification, live_activity, or widget_metric. Call get_webhook_guide first for the format and examples.
payloadNoA sample payload to test on.
providerNogithub or gitlab, for a payload without webhook_id. Defaults to the webhook's provider, else github.
webhook_idNoThe webhook_id from list_webhooks or create_webhook.
delivery_idNoA delivery_id from list_webhook_deliveries to test on.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / event / description
      Previous value: -"X-GitHub-Event name for payload, such as workflow_run."New value: +"For a GitHub payload, the X-GitHub-Event name, such as workflow_run. GitLab payloads name it themselves."
    • changedInput schema / properties / payload / description
      Previous value: -"A sample GitHub payload to test on, with event."New value: +"A sample payload to test on."
    • addedInput schema / properties / provider
      Added value: +{
      +  "description": "github or gitlab, for a payload without webhook_id. Defaults to the webhook's provider, else github.",
      +  "enum": [
      +    "github",
      +    "gitlab"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / rules / description
      Previous value: -"Rules, at most 25. Each picks GitHub events, optionally filters them with a CEL `if`, and runs one action: push_notification, dismiss_push_notification, live_activity, or widget_metric. Call get_webhook_guide first for the format and examples."New value: +"Rules, at most 25. Each picks events, optionally filters them with a CEL `if`, and runs one action: push_notification, dismiss_push_notification, live_activity, or widget_metric. Call get_webhook_guide first for the format and examples."
    • changedInput schema / properties / rules / items / properties / events / description
      Previous value: -"GitHub events this rule handles: an event (workflow_run) or event.action (workflow_run.completed)."New value: +"Events this rule handles: an event or event.action. GitHub: workflow_run or workflow_run.completed. GitLab: the object_kind with its action or status, such as pipeline.failed or merge_request.merge."
    • changedInput schema / properties / rules / items / properties / repositories / description
      Previous value: -"Optional owner/name repositories, or owner/* for an organization. Empty matches every repository."New value: +"Optional repositories (GitHub owner/name, GitLab group/project with any subgroups), or owner/* for everything under an owner or group. Empty matches every repository."
    • changedInput schema / properties / rules / items / properties / repositories / items / pattern
      Previous value: -"^[A-Za-z0-9_.-]+\\/(\\*|[A-Za-z0-9_.-]+)$"New value: +"^[A-Za-z0-9_.-]+(\\/[A-Za-z0-9_.-]+)*\\/(\\*|[A-Za-z0-9_.-]+)$"
  2. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly and non-destructive, and the description reinforces this with "without sending anything." It adds behavior the annotations cannot: what the response reports (what each rule would send, filter errors, missing fields, invalid Live Activity content) and the 7-day lookback used in volume mode.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with the core action and then the two modes. Every clause carries information: return contents, lookback window, and mode selection. No filler or restatement of the title.

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?

For a 6-parameter tool with nested rule objects, the description covers both invocation modes, the optionality contract for `rules`, and the shape of results; an output schema exists, so return-value detail is not required here. Nothing an agent needs to choose a mode is missing.

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 real semantic value the schema cannot: it explains the interaction between `event`, `delivery_id`, and `payload`, and what omitting `rules` means. It does not explain `provider` fallback beyond what the schema already says, which keeps it off a 5.

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?

"Check rules without sending anything" states a specific verb and resource, and immediately separates this dry-run from an actual send (e.g. send_webhook_test). The follow-on sentences make the two operating modes concrete: single-event evaluation vs. 7-day replay over stored deliveries.

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?

Explicitly states when each mode applies: supply an event (delivery_id, or event+payload) to test one event, omit it to score rules against the last 7 days of stored deliveries. It also names the decision for the `rules` parameter: pass them to test edits, omit them to test the webhook's current rules.

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