You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: api parity for webhooks api, fixes webhooks api (#37)
* feat: add webhook tools and fix parameter requirements for OpenAPI parity
- Add 5 missing webhook MCP tools (list, create, get, update, delete)
- Implement all webhook endpoints from OpenAPI spec
- Fix date_start and date_end to be required parameters (per OpenAPI spec) in:
- get-test-results.ts
- get-spec-files-performance.ts
- get-tests-performance.ts
- Register webhook tools in index.ts with comprehensive descriptions
- All webhook tools support full CRUD operations per OpenAPI specification
Co-authored-by: miguel <miguel@currents.dev>
* docs: add comprehensive PR summary and analysis
Co-authored-by: miguel <miguel@currents.dev>
* docs: add final implementation completion report
Co-authored-by: miguel <miguel@currents.dev>
* Webhooks tools and tests (#38)
* revert: restore custom date defaults for performance and test result tools
Co-authored-by: dj <dj@currents.dev>
* test: add comprehensive tests for webhook tools
- Add tests for listWebhooksTool (success and error cases)
- Add tests for getWebhookTool (success and error cases)
- Add tests for createWebhookTool (required fields, all fields, error cases)
- Add tests for updateWebhookTool (single field, all fields, error cases)
- Add tests for deleteWebhookTool (success and error cases)
- All tests verify schema structure
Co-authored-by: dj <dj@currents.dev>
* chore: remove outdated documentation files
These files referenced changes that have been reverted. The PR is now
focused solely on webhook tools implementation.
Co-authored-by: dj <dj@currents.dev>
* docs: add webhook tools to README
Co-authored-by: dj <dj@currents.dev>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* fix: remove .default([]) from hookEvents to allow proper undefined check
Removes .default([]) from hookEvents parameter in create-webhook.ts.
This ensures that when hookEvents is not provided, it remains undefined
rather than being set to an empty array, allowing the undefined check
in the handler to work correctly and avoid sending empty arrays to the API.
Addresses feedback from cubic code review.
Co-authored-by: miguel <miguel@currents.dev>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: DJ Mountney <david.mountney@twkie.net>
logger.error("CURRENTS_API_KEY env variable is not set.");
@@ -199,6 +205,42 @@ server.tool(
199
205
getTestResultsTool.handler
200
206
);
201
207
208
+
// Webhooks API tools
209
+
server.tool(
210
+
"currents-list-webhooks",
211
+
"List all webhooks for a project. Webhooks allow you to receive HTTP POST notifications when certain events occur in your test runs: RUN_FINISH (run completed), RUN_START (run started), RUN_TIMEOUT (run timed out), RUN_CANCELED (run was cancelled). Requires a projectId.",
212
+
listWebhooksTool.schema,
213
+
listWebhooksTool.handler
214
+
);
215
+
216
+
server.tool(
217
+
"currents-create-webhook",
218
+
"Create a new webhook for a project. Specify the URL to receive POST notifications, optional custom headers (as JSON string), events to trigger on (RUN_FINISH, RUN_START, RUN_TIMEOUT, RUN_CANCELED), and an optional label. Requires projectId and url.",
219
+
createWebhookTool.schema,
220
+
createWebhookTool.handler
221
+
);
222
+
223
+
server.tool(
224
+
"currents-get-webhook",
225
+
"Get a single webhook by ID. The hookId is a UUID. Returns full webhook details including url, headers, events, label, and timestamps.",
226
+
getWebhookTool.schema,
227
+
getWebhookTool.handler
228
+
);
229
+
230
+
server.tool(
231
+
"currents-update-webhook",
232
+
"Update an existing webhook. You can update the url, headers (as JSON string), hookEvents array, or label. All fields are optional. The hookId is a UUID.",
233
+
updateWebhookTool.schema,
234
+
updateWebhookTool.handler
235
+
);
236
+
237
+
server.tool(
238
+
"currents-delete-webhook",
239
+
"Delete a webhook. This permanently removes the webhook. The hookId is a UUID.",
0 commit comments