fix(tools) Directly query db for custom tool id#3875
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@BugBot review |
|
@greptile review |
PR SummaryMedium Risk Overview This adds Written by Cursor Bugbot for commit 91755a7. This will update automatically on new commits. Configure here. |
Greptile SummaryThis PR replaces HTTP gateway calls (which were causing 502s under load) with direct database queries for custom tool lookups. It introduces a new Key changes:
Confidence Score: 5/5Safe to merge — the core logic is correct, the gateway-bypass fixes the reported 502s, and all test paths are covered. The only remaining finding is a P2 style nit. All previously raised P1 concerns (dynamic imports, double-query title fallback) are resolved in this iteration. The sole new finding is a cosmetic array-spread style issue that has no runtime impact. No P0 or P1 issues remain on the changed paths. No files require special attention beyond the minor style nit in operations.ts. Important Files Changed
Reviews (2): Last reviewed commit: "Fix lint" | Re-trigger Greptile |
|
@BugBot review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Summary
Adjusted querying custom tool by id from a endpoint call to an internal db call.
Previously, these custom tool calls would each hit our gateway, causing 502s when a large amount were requested and causing 5xx on workflow execution. We can avoid this by directly querying the db instead
Type of Change
Testing
Checklist
Screenshots/Videos