Skip to content

Conversation

madhav165
Copy link
Collaborator

@madhav165 madhav165 commented Sep 25, 2025

🐛 Bug-fix PR


📌 Summary

  • Fixes issue of tool refresh for OAuth when tools already exist in database
  • Creates helper functions to create list of truly new tools, prompts, resources to create after gateway refresh
  • Uses them in update_gateway, toggle_gateway_status (during activation) and fetch_tools_after_oauth
  • Updates the above functions to remove tools, prompts, resources not sent in latest call to gateway
  • Creates new test cases for addition and deletion

🐞 Root Cause

  • For OAuth, the update mechanism did not check if tool update is needed in db
  • For other gateways, the update mechanism was not consistent between update_gateway and toggle_gateway_status
  • The logic was not consistent between tools, prompts and resources

🧪 Verification

Check Command Status
Lint suite make lint pass
Unit tests make test pass
Manual regression no longer fails steps / screenshots Tested with OAuth GitHub server and an SSE server without auth

📐 MCP Compliance (if relevant)

  • No breaking change to MCP clients

✅ Checklist

  • Code formatted (make black isort pre-commit)
  • No secrets/credentials committed

@madhav165 madhav165 self-assigned this Sep 25, 2025
@madhav165 madhav165 added bug Something isn't working python Python / backend development (FastAPI) labels Sep 25, 2025
@madhav165 madhav165 added this to the Release 0.8.0 milestone Sep 25, 2025
madhav165 and others added 10 commits September 27, 2025 12:21
Signed-off-by: Madhav Kandukuri <[email protected]>
Signed-off-by: Madhav Kandukuri <[email protected]>
Signed-off-by: Madhav Kandukuri <[email protected]>
Signed-off-by: Madhav Kandukuri <[email protected]>
Signed-off-by: Madhav Kandukuri <[email protected]>
Signed-off-by: Madhav Kandukuri <[email protected]>
Signed-off-by: Madhav Kandukuri <[email protected]>
Signed-off-by: Madhav Kandukuri <[email protected]>
Signed-off-by: Madhav Kandukuri <[email protected]>
@crivetimihai crivetimihai force-pushed the fix-oauth-tools-refresh branch from 9f56972 to 208cf85 Compare September 27, 2025 11:32
Copy link
Member

@crivetimihai crivetimihai left a comment

Choose a reason for hiding this comment

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

Rebased & tested

@crivetimihai crivetimihai merged commit e9c119c into main Sep 27, 2025
29 of 34 checks passed
@crivetimihai crivetimihai deleted the fix-oauth-tools-refresh branch September 27, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Python / backend development (FastAPI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants