Skip to content

Commit 3fad452

Browse files
committed
docs(mcp): rewrite tool descriptions for investigation focus and expand README
Update all MCP tool descriptions to accurately reflect read-only investigation capabilities per MCP best practices: - Replace generic "Manage" with specific verbs (inspect, query, list) - Add contextual detail about what each tool returns and when to use it - Describe the webhook data model (requests → events → attempts) Expand README MCP section with: - Available tools table showing all 11 tools - Claude Desktop configuration alongside Cursor - Seven example prompts demonstrating investigation workflows https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
1 parent 2d2491e commit 3fad452

3 files changed

Lines changed: 92 additions & 34 deletions

File tree

README.md

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,24 @@ For complete command and flag reference, see [REFERENCE.md](REFERENCE.md).
530530

531531
### Event Gateway MCP
532532

533-
The CLI includes an [MCP](https://modelcontextprotocol.io/) (Model Context Protocol) server that exposes Hookdeck Event Gateway as tools for AI and agent workflows. You don't run it yourself—you add it to your MCP client (e.g. Cursor, Claude), and the editor starts the server when it needs Hookdeck tools (list/inspect connections, sources, destinations, events, requests, attempts, issues, metrics; login when unauthenticated).
533+
The CLI includes an [MCP](https://modelcontextprotocol.io/) (Model Context Protocol) server for investigating webhook traffic in production. It exposes read-only tools that let AI agents query your Hookdeck Event Gateway — inspect connections, trace requests through events and delivery attempts, review issues, and pull aggregate metrics.
534534

535-
**Configure your client** (e.g. Cursor: `~/.cursor/mcp.json` or project-level config):
535+
**Configure your MCP client** (Cursor, Claude Desktop, or any MCP-compatible host):
536+
537+
Cursor (`~/.cursor/mcp.json`):
538+
539+
```json
540+
{
541+
"mcpServers": {
542+
"hookdeck": {
543+
"command": "hookdeck",
544+
"args": ["gateway", "mcp"]
545+
}
546+
}
547+
}
548+
```
549+
550+
Claude Desktop (`claude_desktop_config.json`):
536551

537552
```json
538553
{
@@ -545,7 +560,50 @@ The CLI includes an [MCP](https://modelcontextprotocol.io/) (Model Context Proto
545560
}
546561
```
547562

548-
The client runs `hookdeck gateway mcp` (stdio) as the server process. After configuration, the host can use tools such as `hookdeck_connections_list`, `hookdeck_events_list`, and `hookdeck_login`. For the full tool reference, see [REFERENCE.md](REFERENCE.md) or run `hookdeck gateway mcp --help`.
563+
The client starts `hookdeck gateway mcp` as a stdio subprocess. If you haven't authenticated yet, the `hookdeck_login` tool is available to log in via the browser.
564+
565+
#### Available tools
566+
567+
| Tool | Description |
568+
|------|-------------|
569+
| `hookdeck_projects` | List projects or switch the active project for this session |
570+
| `hookdeck_connections` | Inspect connections and control delivery flow (list, get, pause, unpause) |
571+
| `hookdeck_sources` | Inspect inbound webhook sources |
572+
| `hookdeck_destinations` | Inspect webhook delivery destinations |
573+
| `hookdeck_transformations` | Inspect JavaScript transformations applied to payloads |
574+
| `hookdeck_requests` | Query inbound requests — list, get details, raw body, linked events |
575+
| `hookdeck_events` | Query processed events — list, get details, raw payload body |
576+
| `hookdeck_attempts` | Query delivery attempts — retry history, response codes, errors |
577+
| `hookdeck_issues` | Inspect aggregated failure signals (delivery failures, transform errors, backpressure) |
578+
| `hookdeck_metrics` | Query aggregate metrics — counts, failure rates, queue depth over time |
579+
| `hookdeck_help` | Discover available tools and their actions |
580+
581+
#### Example prompts
582+
583+
Once the MCP server is configured, you can ask your agent questions like:
584+
585+
```
586+
"Are any of my webhooks failing right now?"
587+
→ Agent uses hookdeck_issues to list open issues, then hookdeck_events to inspect recent failures.
588+
589+
"Show me the last 10 events for my Stripe source and check if any failed."
590+
→ Agent uses hookdeck_sources to find the Stripe source, then hookdeck_events filtered by source and status.
591+
592+
"What's the error rate for my API destination over the last 24 hours?"
593+
→ Agent uses hookdeck_metrics with measures like failed_count and count, grouped by destination.
594+
595+
"Trace request req_abc123 — what events did it produce, and did they all deliver successfully?"
596+
→ Agent uses hookdeck_requests to get the request, then the events action to list generated events.
597+
598+
"Why is my checkout webhook returning 500s? Show me the latest attempt details."
599+
→ Agent uses hookdeck_events filtered by status FAILED, then hookdeck_attempts to inspect delivery details.
600+
601+
"Pause the connection between Stripe and my staging endpoint while I debug."
602+
→ Agent uses hookdeck_connections to find and pause the connection.
603+
604+
"Compare failure rates across all my destinations this week."
605+
→ Agent uses hookdeck_metrics with dimensions set to destination_id and measures like error_rate.
606+
```
549607

550608
### Manage connections
551609

pkg/gateway/mcp/tool_help.go

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ func helpOverview(client *hookdeck.Client) *mcpsdk.CallToolResult {
3535
3636
Current project: %s
3737
38-
hookdeck_projects — List or switch projects (actions: list, use)
39-
hookdeck_connections — Manage connections/webhook routes (actions: list, get, pause, unpause)
40-
hookdeck_sources — Manage inbound webhook sources (actions: list, get)
41-
hookdeck_destinations — Manage webhook delivery destinations (actions: list, get)
42-
hookdeck_transformations — Manage JavaScript transformations (actions: list, get)
43-
hookdeck_requests — Query inbound webhook requests (actions: list, get, raw_body, events, ignored_events)
44-
hookdeck_events — Query events (actions: list, get, raw_body)
45-
hookdeck_attempts — Query delivery attempts (actions: list, get)
46-
hookdeck_issues — Inspect issues (actions: list, get)
47-
hookdeck_metrics — Query metrics (actions: events, requests, attempts, transformations)
48-
hookdeck_help — This help text
38+
hookdeck_projects — List or switch projects (actions: list, use)
39+
hookdeck_connections — Inspect connections and control delivery flow (actions: list, get, pause, unpause)
40+
hookdeck_sources — Inspect inbound webhook sources (actions: list, get)
41+
hookdeck_destinations — Inspect webhook delivery destinations (actions: list, get)
42+
hookdeck_transformations — Inspect JavaScript transformations (actions: list, get)
43+
hookdeck_requests — Query inbound webhook requests (actions: list, get, raw_body, events, ignored_events)
44+
hookdeck_events — Query processed webhook events (actions: list, get, raw_body)
45+
hookdeck_attempts — Query delivery attempts (actions: list, get)
46+
hookdeck_issues — Inspect aggregated failure signals (actions: list, get)
47+
hookdeck_metrics — Query aggregate metrics (actions: events, requests, attempts, transformations)
48+
hookdeck_help — This help text
4949
5050
Use hookdeck_help with topic="<tool_name>" for detailed help on a specific tool.`, projectInfo)
5151

@@ -63,13 +63,13 @@ Parameters:
6363
action (string, required) — "list" or "use"
6464
project_id (string) — Required for "use" action`,
6565

66-
"hookdeck_connections": `hookdeck_connections — Manage connections (webhook routes)
66+
"hookdeck_connections": `hookdeck_connections — Inspect connections and control delivery flow
6767
6868
Actions:
6969
list — List connections with optional filters
7070
get — Get a single connection by ID
71-
pause — Pause a connection
72-
unpause — Unpause a connection
71+
pause — Pause a connection (stops event delivery)
72+
unpause — Resume a paused connection
7373
7474
Parameters:
7575
action (string, required) — list, get, pause, or unpause
@@ -81,7 +81,7 @@ Parameters:
8181
limit (integer) — Max results (list, default 100)
8282
next/prev (string) — Pagination cursors (list)`,
8383

84-
"hookdeck_sources": `hookdeck_sources — Manage inbound webhook sources
84+
"hookdeck_sources": `hookdeck_sources — Inspect inbound webhook sources
8585
8686
Actions:
8787
list — List sources with optional filters
@@ -94,7 +94,7 @@ Parameters:
9494
limit (integer) — Max results (list, default 100)
9595
next/prev (string) — Pagination cursors (list)`,
9696

97-
"hookdeck_destinations": `hookdeck_destinations — Manage webhook delivery destinations
97+
"hookdeck_destinations": `hookdeck_destinations — Inspect webhook delivery destinations
9898
9999
Actions:
100100
list — List destinations with optional filters
@@ -107,7 +107,7 @@ Parameters:
107107
limit (integer) — Max results (list, default 100)
108108
next/prev (string) — Pagination cursors (list)`,
109109

110-
"hookdeck_transformations": `hookdeck_transformations — Manage JavaScript transformations
110+
"hookdeck_transformations": `hookdeck_transformations — Inspect JavaScript transformations
111111
112112
Actions:
113113
list — List transformations with optional filters
@@ -178,7 +178,7 @@ Parameters:
178178
dir (string) — "asc" or "desc" (list)
179179
next/prev (string) — Pagination cursors (list)`,
180180

181-
"hookdeck_issues": `hookdeck_issues — Inspect issues
181+
"hookdeck_issues": `hookdeck_issues — Inspect aggregated failure signals
182182
183183
Actions:
184184
list — List issues with optional filters
@@ -195,7 +195,7 @@ Parameters:
195195
limit (integer) — Max results (list, default 100)
196196
next/prev (string) — Pagination cursors (list)`,
197197

198-
"hookdeck_metrics": `hookdeck_metrics — Query metrics
198+
"hookdeck_metrics": `hookdeck_metrics — Query aggregate metrics
199199
200200
Actions:
201201
events — Event metrics (auto-routes to queue-depth, pending, or by-issue as needed)
@@ -216,7 +216,7 @@ Parameters:
216216
status (string) — Filter by status
217217
issue_id (string) — Filter by issue (events only)`,
218218

219-
"hookdeck_help": `hookdeck_help — Describe available tools
219+
"hookdeck_help": `hookdeck_help — Get an overview of available tools or detailed help for a specific tool
220220
221221
Parameters:
222222
topic (string) — Tool name for detailed help (e.g. "hookdeck_events"). Omit for overview.`,

pkg/gateway/mcp/tools.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func toolDefs(client *hookdeck.Client) []struct {
2222
{
2323
tool: &mcpsdk.Tool{
2424
Name: "hookdeck_projects",
25-
Description: "List available Hookdeck projects or switch the active project for this session.",
25+
Description: "List available Hookdeck projects or switch the active project for this session. Use this to see which project you're querying and to change project context.",
2626
InputSchema: schema(map[string]prop{
2727
"action": {Type: "string", Desc: "Action to perform: list or use", Enum: []string{"list", "use"}},
2828
"project_id": {Type: "string", Desc: "Project ID (required for use action)"},
@@ -33,7 +33,7 @@ func toolDefs(client *hookdeck.Client) []struct {
3333
{
3434
tool: &mcpsdk.Tool{
3535
Name: "hookdeck_connections",
36-
Description: "Manage connections (webhook routes) that link sources to destinations.",
36+
Description: "Inspect webhook connections (routes linking sources to destinations). List connections with filters, get details by ID, or pause/unpause a connection's delivery pipeline.",
3737
InputSchema: schema(map[string]prop{
3838
"action": {Type: "string", Desc: "Action: list, get, pause, or unpause", Enum: []string{"list", "get", "pause", "unpause"}},
3939
"id": {Type: "string", Desc: "Connection ID (required for get/pause/unpause)"},
@@ -51,7 +51,7 @@ func toolDefs(client *hookdeck.Client) []struct {
5151
{
5252
tool: &mcpsdk.Tool{
5353
Name: "hookdeck_sources",
54-
Description: "Manage inbound webhook sources.",
54+
Description: "List and inspect inbound webhook sources. Returns source configuration including URL, verification settings, and allowed HTTP methods.",
5555
InputSchema: schema(map[string]prop{
5656
"action": {Type: "string", Desc: "Action: list or get", Enum: []string{"list", "get"}},
5757
"id": {Type: "string", Desc: "Source ID (required for get)"},
@@ -66,7 +66,7 @@ func toolDefs(client *hookdeck.Client) []struct {
6666
{
6767
tool: &mcpsdk.Tool{
6868
Name: "hookdeck_destinations",
69-
Description: "Manage webhook delivery destinations.",
69+
Description: "List and inspect webhook delivery destinations. Returns destination configuration including URL, authentication, and rate limiting settings.",
7070
InputSchema: schema(map[string]prop{
7171
"action": {Type: "string", Desc: "Action: list or get", Enum: []string{"list", "get"}},
7272
"id": {Type: "string", Desc: "Destination ID (required for get)"},
@@ -81,7 +81,7 @@ func toolDefs(client *hookdeck.Client) []struct {
8181
{
8282
tool: &mcpsdk.Tool{
8383
Name: "hookdeck_transformations",
84-
Description: "Manage JavaScript transformations applied to webhook payloads.",
84+
Description: "List and inspect JavaScript transformations applied to webhook payloads. Returns transformation code and configuration for debugging payload processing.",
8585
InputSchema: schema(map[string]prop{
8686
"action": {Type: "string", Desc: "Action: list or get", Enum: []string{"list", "get"}},
8787
"id": {Type: "string", Desc: "Transformation ID (required for get)"},
@@ -96,7 +96,7 @@ func toolDefs(client *hookdeck.Client) []struct {
9696
{
9797
tool: &mcpsdk.Tool{
9898
Name: "hookdeck_requests",
99-
Description: "Query inbound webhook requests received by Hookdeck.",
99+
Description: "Query inbound webhook requests (raw data received by Hookdeck before routing). List with filters, get details, inspect the raw body, or view the events and ignored events generated from a request.",
100100
InputSchema: schema(map[string]prop{
101101
"action": {Type: "string", Desc: "Action: list, get, raw_body, events, or ignored_events", Enum: []string{"list", "get", "raw_body", "events", "ignored_events"}},
102102
"id": {Type: "string", Desc: "Request ID (required for get/raw_body/events/ignored_events)"},
@@ -114,7 +114,7 @@ func toolDefs(client *hookdeck.Client) []struct {
114114
{
115115
tool: &mcpsdk.Tool{
116116
Name: "hookdeck_events",
117-
Description: "Query events (processed webhook deliveries).",
117+
Description: "Query events (webhook deliveries routed through connections). List with filters by status, source, destination, or date range. Get event details or inspect the raw payload body.",
118118
InputSchema: schema(map[string]prop{
119119
"action": {Type: "string", Desc: "Action: list, get, or raw_body", Enum: []string{"list", "get", "raw_body"}},
120120
"id": {Type: "string", Desc: "Event ID (required for get/raw_body)"},
@@ -139,7 +139,7 @@ func toolDefs(client *hookdeck.Client) []struct {
139139
{
140140
tool: &mcpsdk.Tool{
141141
Name: "hookdeck_attempts",
142-
Description: "Query delivery attempts for webhook events.",
142+
Description: "Query delivery attempts (each HTTP request made to deliver an event to its destination). Filter by event to see retry history, response status codes, and error details.",
143143
InputSchema: schema(map[string]prop{
144144
"action": {Type: "string", Desc: "Action: list or get", Enum: []string{"list", "get"}},
145145
"id": {Type: "string", Desc: "Attempt ID (required for get)"},
@@ -156,7 +156,7 @@ func toolDefs(client *hookdeck.Client) []struct {
156156
{
157157
tool: &mcpsdk.Tool{
158158
Name: "hookdeck_issues",
159-
Description: "List and inspect Hookdeck issues (delivery failures, transformation errors, etc.).",
159+
Description: "List and inspect Hookdeck issues — aggregated failure signals such as repeated delivery failures, transformation errors, and backpressure alerts. Use this to identify systemic problems across your webhooks.",
160160
InputSchema: schema(map[string]prop{
161161
"action": {Type: "string", Desc: "Action: list or get", Enum: []string{"list", "get"}},
162162
"id": {Type: "string", Desc: "Issue ID (required for get)"},
@@ -175,7 +175,7 @@ func toolDefs(client *hookdeck.Client) []struct {
175175
{
176176
tool: &mcpsdk.Tool{
177177
Name: "hookdeck_metrics",
178-
Description: "Query metrics for events, requests, attempts, and transformations.",
178+
Description: "Query aggregate metrics over a time range. Get counts, failure rates, error rates, queue depth, and pending event data for events, requests, attempts, and transformations. Supports grouping by dimensions like source, destination, or connection.",
179179
InputSchema: schema(map[string]prop{
180180
"action": {Type: "string", Desc: "Metric type: events, requests, attempts, or transformations", Enum: []string{"events", "requests", "attempts", "transformations"}},
181181
"start": {Type: "string", Desc: "Start datetime (ISO 8601, required)"},
@@ -195,7 +195,7 @@ func toolDefs(client *hookdeck.Client) []struct {
195195
{
196196
tool: &mcpsdk.Tool{
197197
Name: "hookdeck_help",
198-
Description: "Describe available tools and their actions.",
198+
Description: "Get an overview of all available Hookdeck tools or detailed help for a specific tool. Use this when unsure which tool to use for a task.",
199199
InputSchema: schema(map[string]prop{
200200
"topic": {Type: "string", Desc: "Tool name for detailed help (e.g. hookdeck_events). Omit for overview."},
201201
}),

0 commit comments

Comments
 (0)