Skip to content

feat(mcp): add agent webhook management tools (PRO-1950) - #32

Merged
prat11m merged 1 commit into
mainfrom
feature/pro-1950-featmcp-add-agent-webhook-management-tools
Jul 24, 2026
Merged

feat(mcp): add agent webhook management tools (PRO-1950)#32
prat11m merged 1 commit into
mainfrom
feature/pro-1950-featmcp-add-agent-webhook-management-tools

Conversation

@prat11m

@prat11m prat11m commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds 5 MCP tools (1:1 with backend /webhook routes) to manage agent webhooks / event subscriptions — attaching start-call / end-call / post-call-analytics deliveries to agents, which was previously only possible via the dashboard or the main-backend API directly.
  • Event types map to: pre-conversation (call start), post-conversation (call end), analytics-completed (post-call analytics).
  • New file src/tools/webhooks.ts; registered in src/tools/index.ts.
Tool Route
create_webhook POST /webhook
get_webhooks GET /webhook[?webhookId=]
update_webhook PATCH /webhook/:id
delete_webhook DELETE /webhook/:id
get_webhook_events GET /webhook/events?webhookId=

Notes / limitations

  • Backend only writes subscriptions at create time; PATCH /webhook/:id updates URL/description/headers but not WebhookSubscription. So update_webhook cannot re-attach agents/events — callers must delete + recreate. Documented in the tool description.
  • mcp-server is standalone (no @repo/atoms-types), so the event-type enum is defined locally.
  • Auth reuses the existing Bearer API key — webhook routes share the same verifyToken → verifyOrganization → verifyMemberRole chain as /agent.

Test plan

  • create_webhook with an agent_id + all 3 event types → returns webhook id; verify subscriptions in dashboard.
  • get_webhooks (list + by id) shows populated agent/event subscriptions.
  • update_webhook changes URL/description/headers.
  • get_webhook_events returns delivery logs after a test call.
  • delete_webhook removes it and detaches from the agent.

Linear

PRO-1950

🤖 Generated with Claude Code

Adds create/get/update/delete/get_events tools for agent webhook
subscriptions (pre-conversation, post-conversation,
analytics-completed) wrapping the main-backend /webhook routes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@prat11m
prat11m merged commit e80ae81 into main Jul 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants