-
Notifications
You must be signed in to change notification settings - Fork 292
Fix Tool Edit Screen: Field Mapping Consistency and Custom Tool Naming Implementation #786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
* Add logging UI Signed-off-by: Mihai Criveti <[email protected]> * Add logging UI Signed-off-by: Mihai Criveti <[email protected]> * Add logging UI Signed-off-by: Mihai Criveti <[email protected]> * Add logging UI readme Signed-off-by: Mihai Criveti <[email protected]> * Update logging flake8 Signed-off-by: Mihai Criveti <[email protected]> * Update logging flake8 Signed-off-by: Mihai Criveti <[email protected]> * test coverage Signed-off-by: Mihai Criveti <[email protected]> * test coverage Signed-off-by: Mihai Criveti <[email protected]> * Fix download Signed-off-by: Mihai Criveti <[email protected]> * Fix test Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]>
* Fix download Signed-off-by: Mihai Criveti <[email protected]> * Reverse proxy Signed-off-by: Mihai Criveti <[email protected]> * Reverse proxy Signed-off-by: Mihai Criveti <[email protected]> * Reverse proxy Signed-off-by: Mihai Criveti <[email protected]> * doctest improvements Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]>
Signed-off-by: Ian Molloy <[email protected]>
* Fix rpc endpoints Signed-off-by: Madhav Kandukuri <[email protected]> * Remove commented code Signed-off-by: Madhav Kandukuri <[email protected]> * remove duplicate code in session registry Signed-off-by: Madhav Kandukuri <[email protected]> * Linting fixes Signed-off-by: Madhav Kandukuri <[email protected]> * Fix tests Signed-off-by: Madhav Kandukuri <[email protected]> --------- Signed-off-by: Madhav Kandukuri <[email protected]>
* Fix tool invocation 'Invalid method' error with backward compatibility (IBM#753) - Add backward compatibility for direct tool invocation (pre-PR IBM#746 format) - Support both old format (method=tool_name) and new format (method=tools/call) - Add comprehensive test coverage for RPC tool invocation scenarios - Ensure graceful fallback to gateway forwarding when method is not a tool The RPC endpoint now handles tool invocations in both formats: 1. New format: method='tools/call' with name and arguments in params 2. Old format: method='tool_name' with params as arguments (backward compat) This maintains compatibility with existing clients while supporting the new standardized RPC method structure introduced in PR IBM#746. Signed-off-by: Mihai Criveti <[email protected]> * Fix flake8 E722: Replace bare except with Exception Signed-off-by: Mihai Criveti <[email protected]> * lint Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]>
IBM#755) - Added nosec B105 for ENV_TOKEN as it's an environment variable name, not a hardcoded secret - Added nosec B110 for intentional exception swallowing in cleanup/error handling paths - Both cases are legitimate uses where errors should be silently ignored to prevent cascading failures Signed-off-by: Mihai Criveti <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
Signed-off-by: Vinod Muthusamy <[email protected]> Co-authored-by: Vinod Muthusamy <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
* Implement comprehensive fuzz testing automation (IBM#256) - Add property-based testing with Hypothesis for JSON-RPC, JSONPath, and schema validation - Add coverage-guided fuzzing with Atheris for deep code path exploration - Add API endpoint fuzzing with Schemathesis for contract validation - Add security-focused testing for vulnerability discovery (SQL injection, XSS, etc.) - Add complete Makefile automation with fuzz-all, fuzz-quick, fuzz-extended targets - Add optional [fuzz] dependency group in pyproject.toml for clean installation - Add comprehensive reporting with JSON/Markdown outputs and executive summaries - Add complete developer documentation with examples and troubleshooting guides - Exclude fuzz tests from main test suite to prevent auth failures - Found multiple real bugs in JSON-RPC validation during development Signed-off-by: Mihai Criveti <[email protected]> * Update fuzz testing Signed-off-by: Mihai Criveti <[email protected]> * Update fuzz testing Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]>
* Update CORS Signed-off-by: Mihai Criveti <[email protected]> * Update CORS Signed-off-by: Mihai Criveti <[email protected]> * Update CORS ADRs Signed-off-by: Mihai Criveti <[email protected]> * Update CORS Signed-off-by: Mihai Criveti <[email protected]> * Update CORS Signed-off-by: Mihai Criveti <[email protected]> * Fix compose Signed-off-by: Mihai Criveti <[email protected]> * Update helm chart Signed-off-by: Mihai Criveti <[email protected]> * Update CORS docs Signed-off-by: Mihai Criveti <[email protected]> * Update test Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]>
* feat: Bulk Import Tools modal wiring and backend implementation - Add modal UI in admin.html with bulk import button and dialog - Implement modal open/close/ESC functionality in admin.js - Add POST /admin/tools/import endpoint with rate limiting - Support both JSON textarea and file upload inputs - Validate JSON structure and enforce 200 tool limit - Return detailed success/failure information per tool - Include loading states and comprehensive error handling Refs IBM#737 Signed-off-by: Mihai Criveti <[email protected]> * fix: Remove duplicate admin_import_tools function and fix HTML formatting - Remove duplicate admin_import_tools function definition - Fix HTML placeholder attribute to use double quotes - Add missing closing div tag - Fix flake8 blank line issues Signed-off-by: Mihai Criveti <[email protected]> * feat: Complete bulk import backend with file upload support and enhanced docs - Add file upload support to admin_import_tools endpoint - Fix response format to match frontend expectations - Add UI usage documentation with modal instructions - Update API docs to show all three input methods - Enhance bulk import guide with UI and API examples Backend improvements: - Support tools_file form field for JSON file uploads - Proper file content parsing with error handling - Response includes imported/failed counts and details - Frontend-compatible response format for UI display Signed-off-by: Mihai Criveti <[email protected]> * Bulk import Signed-off-by: Mihai Criveti <[email protected]> * fix: Remove conflicting inline script and fix bulk import functionality - Remove conflicting inline JavaScript that was preventing form submission - Fix indentation in setupBulkImportModal function - Ensure bulk import modal uses proper admin.js implementation - Restore proper form submission handling for bulk import This fixes the issue where bulk import appeared to do nothing. Signed-off-by: Mihai Criveti <[email protected]> * fix: Integrate bulk import setup with main initialization - Add setupBulkImportModal() to main initialization sequence - Remove duplicate DOMContentLoaded listener - Ensure bulk import doesn't interfere with other tab functionality Signed-off-by: Mihai Criveti <[email protected]> * fix: JavaScript formatting issues in bulk import modal - Fix multiline querySelector formatting - Fix multiline Error constructor formatting - Ensure prettier compliance for web linting Signed-off-by: Mihai Criveti <[email protected]> * debug: Temporarily disable bulk import setup to test tabs Signed-off-by: Mihai Criveti <[email protected]> * fix: Remove duplicate setupFormValidation call and delay bulk import setup - Remove duplicate setupFormValidation() call that could cause conflicts - Use setTimeout to delay bulk import modal setup after other initialization - Add better null safety to form element queries - This should fix tab switching issues Signed-off-by: Mihai Criveti <[email protected]> * fix: Restore proper initialization sequence for tab functionality - Remove setTimeout delay for bulk import setup - Keep bulk import setup in main initialization but with error handling - Ensure tab navigation isn't affected by bulk import modal setup Signed-off-by: Mihai Criveti <[email protected]> * fix: Correct HTML structure and restore tab navigation - Move bulk import modal to correct location after tools panel - Remove extra closing div that was breaking HTML structure - Ensure proper page-level modal placement - Restore tab navigation functionality for all tabs This fixes the broken Global Resources, Prompts, Gateways, Roots, and Metrics tabs. Signed-off-by: Mihai Criveti <[email protected]> * feat: Add configurable bulk import settings Configuration additions: - MCPGATEWAY_BULK_IMPORT_MAX_TOOLS (default: 200) - MCPGATEWAY_BULK_IMPORT_RATE_LIMIT (default: 10) Implementation: - config.py: Add new settings with defaults - admin.py: Use configurable rate limit and batch size - .env.example: Document all bulk import environment variables - admin.html: Use dynamic max tools value in UI text - CLAUDE.md: Document configuration options for developers - docs: Update bulk import guide with configuration details This makes bulk import fully configurable for different deployment scenarios. Signed-off-by: Mihai Criveti <[email protected]> * Update docs Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]> Co-authored-by: Mihai Criveti <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
* Import export Signed-off-by: Mihai Criveti <[email protected]> * Import export Signed-off-by: Mihai Criveti <[email protected]> * Import export Signed-off-by: Mihai Criveti <[email protected]> * Import export Signed-off-by: Mihai Criveti <[email protected]> * Import export Signed-off-by: Mihai Criveti <[email protected]> * Import export Signed-off-by: Mihai Criveti <[email protected]> * Import export Signed-off-by: Mihai Criveti <[email protected]> * Import export Signed-off-by: Mihai Criveti <[email protected]> * Import export testing Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]>
Signed-off-by: Frederico Araujo <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
* Metadata / creation dates Signed-off-by: Mihai Criveti <[email protected]> * Metadata / creation dates Signed-off-by: Mihai Criveti <[email protected]> * Metadata / creation dates Signed-off-by: Mihai Criveti <[email protected]> * Security headers CSP Signed-off-by: Mihai Criveti <[email protected]> * Display metadata for resources Signed-off-by: Madhav Kandukuri <[email protected]> * eslint fix Signed-off-by: Madhav Kandukuri <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]> Co-authored-by: Madhav Kandukuri <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
* Fix annotations edit Signed-off-by: Mihai Criveti <[email protected]> * Fix annotations edit Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]>
* feat: update context forge target in template's project dependencies Signed-off-by: Frederico Araujo <[email protected]> * fix: exclude jinja files from reformatting tabs Signed-off-by: Frederico Araujo <[email protected]> * fix: plugins cli defaults Signed-off-by: Frederico Araujo <[email protected]> * fix: revert formatted Makefile template Signed-off-by: Frederico Araujo <[email protected]> * feat: add optional packages Signed-off-by: Frederico Araujo <[email protected]> * docs: update plugin template docs Signed-off-by: Frederico Araujo <[email protected]> * docs: update template readme Signed-off-by: Frederico Araujo <[email protected]> --------- Signed-off-by: Frederico Araujo <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
Signed-off-by: RAKHI DUTTA <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected.
- Added tools with MCP server
- Updated tool name from edit tool box
- Tool shows with updated name in gateway and other clients like MCP Inspector and tool works.
GOOD TO MERGE.
@rakdutta Do we need to allow editing name in update_tool function in tool_service?
Signed-off-by: Mihai Criveti <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased and tested
@madhav165 |
Overview
This PR resolves issue #715 by implementing custom tool naming functionality and fixing field mapping inconsistencies in the tool edit screen. The changes improve the user experience by distinguishing between MCP and REST tool editing capabilities while maintaining backward compatibility.
Key Features
🔹 Custom Tool Naming
custom_name
field: Allows users to set display names independent of original MCP server tool namesoriginal_name_slug
→custom_name
/custom_name_slug
fieldscustom_name
tooriginal_name
if not explicitly providedcustom_name_slug
for internal routing🔹 Enhanced Tool Edit Logic
MCP Tools (Read-only constraints):
REST Tools (Full editing):
🔹 UI/UX Improvements
name
field maintains API compatibility while displayingcustomName
to usersTechnical Details
Database Changes
API Schema Updates
Frontend Logic
Backward Compatibility
custom_name_slug
fromoriginal_name_slug
Testing
Verified functionality through both the UI and API endpoints.