Skip to content

Webhooks tools and tests#38

Merged
twk3 merged 4 commits intocursor/openapi-mcp-parity-9b9cfrom
cursor/webhooks-tools-and-tests-101a
Jan 23, 2026
Merged

Webhooks tools and tests#38
twk3 merged 4 commits intocursor/openapi-mcp-parity-9b9cfrom
cursor/webhooks-tools-and-tests-101a

Conversation

@twk3
Copy link
Contributor

@twk3 twk3 commented Jan 23, 2026

Revert unintended date parameter changes and add comprehensive tests for the new webhook tools.

The date_start and date_end parameters in get-spec-files-performance.ts, get-test-results.ts, and get-tests-performance.ts were previously made required and their custom default values were removed. This PR restores their optional status and original default logic. Additionally, comprehensive tests have been added for all webhook tools to ensure their correct functionality, as requested. Outdated documentation files related to the previous broader scope of changes have also been removed for clarity.


Open in Cursor Open in Web


Summary by cubic

Restored optional date range parameters with sensible defaults in performance and test result tools, and added comprehensive tests for webhook tools. This fixes unintended changes and improves reliability.

  • Bug Fixes

    • Made date_start/date_end optional again in get-spec-files-performance, get-tests-performance, and get-test-results.
    • Restored defaults: performance tools use 30 days ago to now; test results use 365 days ago to now.
  • Refactors

    • Added tests for webhook tools (list, get, create, update, delete) covering success and error cases and validating schemas.
    • Removed outdated documentation files tied to the previous broader scope.

Written for commit 3f303fb. Summary will update on new commits.

cursoragent and others added 3 commits January 23, 2026 01:26
- 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>
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>
@cursor
Copy link

cursor bot commented Jan 23, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Co-authored-by: dj <dj@currents.dev>
@twk3 twk3 marked this pull request as ready for review January 23, 2026 02:22
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 7 files

@twk3 twk3 merged commit 697512e into cursor/openapi-mcp-parity-9b9c Jan 23, 2026
3 checks passed
miguelangaranocurrents added a commit that referenced this pull request Jan 26, 2026
* 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>
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.

2 participants