test_webhook
Validate webhook configuration by sending a test event to its endpoint using the webhook ID.
Instructions
Send a test event to a webhook endpoint to verify it works.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| webhook_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/devhelm_mcp/tools/webhooks.py:72-78 (handler)The handler function for the 'test_webhook' tool. It takes a webhook_id (and optional api_token), calls the DevHelm SDK's webhooks.test() method, and returns the serialized result or raises a tool error.
@mcp.tool() def test_webhook(webhook_id: str, api_token: str | None = None) -> ToolResult: """Send a test event to a webhook endpoint to verify it works.""" try: return serialize(get_client(api_token).webhooks.test(webhook_id)) except DevhelmError as e: raise_tool_error(e) - The function signature defines the schema: required 'webhook_id' (str) and optional 'api_token' (str | None).
def test_webhook(webhook_id: str, api_token: str | None = None) -> ToolResult: - src/devhelm_mcp/tools/webhooks.py:18-18 (registration)The 'register' function that registers tools (including test_webhook) onto the FastMCP instance via the @mcp.tool() decorator.
def register(mcp: FastMCP) -> None: - src/devhelm_mcp/server.py:109-110 (registration)In server.py, all tool modules (including webhooks) have their register() method called, which wires up test_webhook to the MCP server.
for mod in ALL_TOOL_MODULES: mod.register(mcp) - src/devhelm_mcp/client.py:23-23 (helper)ToolResult type alias used as the return type of test_webhook.
ToolResult = dict[str, Any] | list[dict[str, Any]] | str