Skip to main content
Glama

Add a webhook endpoint

create_webhook
Destructive

Instead of polling get_post, have Shager POST events to your HTTPS endpoint (a CRM, your agent's server): post.destination.published (data: post_id, destination_id, channel_id, network, account, format, remote_url, remote_post_id, published_at, notice), post.destination.failed (… error, unconfirmed), post.completed (post_id, status, counts, destinations[] with state and remote_url), approval.decided (post_id, approval_id, decision, post_status, reviewer.name, comment). Body: { id, type, created_at, data } (data always has workspace_id). The id is the same on every retry: dedupe on it. Order is not guaranteed. Headers: Shager-Event-Id, Shager-Event-Type and Shager-Signature: t=,v1=<hex HMAC-SHA256 of "." with the secret>. Verify it on the raw body in constant time and refuse timestamps older than 5 minutes. Answer 2xx within 10 s. Anything else (redirects included) is retried: 6 attempts over about a day. An endpoint whose every attempt fails for 3 days is turned off; a successful send_test_webhook turns it back on. Signing secret (whsec_…): the REST API returns it once, in this response. Through an AI assistant or the CLI it is never returned (secret is null): the person copies a fresh one in the app (the workspace's Settings → webhooks → "New signing key") and puts it in the receiving system. https only; private, local and credentialed URLs are refused. Up to 10 endpoints per workspace. Publishing never waits for webhooks. (Not available in an unclaimed sandbox.)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspace_id": "<workspace_id>",
      "url": "<url>"
    },
    "name": "create_webhook"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYeshttps:// URL that receives the events.
eventsNoEvent types to send. Omit for every event, including ones added later.
descriptionNoWhat it is for (shown in the app).
workspace_idYesWorkspace id from list_workspaces

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Far beyond the annotations, it discloses retry policy (6 attempts over ~1 day, redirects retried), the 10 s 2xx requirement, auto-disablement after 3 days and re-enablement via send_test_webhook, the https-only/private-URL rejection, the 10-endpoint-per-workspace cap, and that publishing never blocks on webhooks. It also explains the critical secret-return caveat (returned once via REST, null through an AI assistant or CLI) and the signature scheme with a 5-minute timestamp window.

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?

Dense but nearly every sentence carries operational information an integrator needs — signatures, retries, limits, secret handling. The opening is framed as a rationale ('Instead of polling get_post') rather than a front-loaded statement of what the tool does, and the payload/header details crowd the middle, but there is little pure filler.

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 4-parameter, no-output-schema creation tool, the description covers what an agent needs to call it correctly and what the caller must do afterward: endpoint hygiene rules, signature verification code path, secret provisioning through the app when the API value is null, and the sandbox exclusion. Nothing material is missing given the 100% schema coverage.

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 already 100%, so the baseline is 3, but the description adds real meaning to the `events` enum by spelling out the payload fields each event carries (post_id, destination_id, remote_url, error, decision, etc.). The `description` parameter and the `workspace_id` provenance are left to the schema, so it is not fully additive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a concrete action — have Shager POST events to your HTTPS endpoint instead of polling get_post — and enumerates the four event types delivered. The verb 'create/register' is only implied via the framing and title, and it never explicitly contrasts with siblings such as list_webhooks, delete_webhook, or send_test_webhook, so an agent must infer it is the endpoint-creation tool.

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

Usage Guidelines3/5

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

'Instead of polling get_post' gives one clear motivating alternative, and the mention that a successful send_test_webhook re-enables a disabled endpoint implies when that sibling applies. However there is no explicit when-to-use/when-not guidance, no prerequisite note (e.g. needing workspace admin rights), and no statement of what to do instead if webhooks are unavailable in a sandbox beyond the parenthetical.

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