Skip to content

Conversation

@crivetimihai
Copy link
Member

Problem: After merging PR #731, both Add Tool and Edit Tool forms stopped working with multiple validation errors.

Issues Found:

  1. Missing name field - PR Fix #715: align Add & Edit Tool fields & prefill MCP integration/request #731 removed the name field and added gateway_name/original_name fields that don't exist in the database schema
  2. MCP integration type validation - Backend prevents changing tools to MCP type, but form allowed it
  3. Request type validation - Form was defaulting to "SSE" for REST tools, causing validation errors

Fixes Applied:

admin.html:

  • Restored the required name field to both Add and Edit forms
  • Removed unsupported gateway_name and original_name fields

admin.js:

  • Added logic to disable integration type dropdown for MCP tools (prevents invalid changes)

admin.py:

  • Made integration_type conditional - only included when provided (not disabled)
  • Made request_type conditional - only included when provided
  • Added debug logging for form data

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
@crivetimihai crivetimihai marked this pull request as ready for review August 14, 2025 08:13
@rakdutta rakdutta self-requested a review August 14, 2025 08:22
Copy link
Collaborator

@rakdutta rakdutta left a comment

Choose a reason for hiding this comment

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

PR Testing Summary:

  • make serve – Pass
  • make test – Pass (80% coverage; 1658 passed, 11 skipped, 63 warnings in 95.32s)
  • make autoflake isort black flake8 – No errors
  • make pylint – Pass (Code rated 10.00/10)
  • make smoketest – Pass (✅ Smoketest passed!)
  • make doctest – Pass (468 passed, 6 skipped, 3 warnings in 24.67s)

Verified Add/Edit Tool functionality for the integration type – working as expected.
Note: In the edit_form, the integration_type for MCP can currently be changed to REST, which is not expected. This will be addressed under issue #715.

Proceeding to re-open issue #715.

@madhav165 madhav165 merged commit da2e25b into main Aug 14, 2025
37 checks passed
@madhav165 madhav165 deleted the fix-edit-form branch August 14, 2025 09:21
vk-playground pushed a commit to vk-playground/mcp-context-forge that referenced this pull request Sep 14, 2025
Fix edit tools

Signed-off-by: Madhav Kandukuri <madhav165@users.noreply.github.com>
vk-playground pushed a commit to vk-playground/mcp-context-forge that referenced this pull request Sep 14, 2025
vk-playground pushed a commit to vk-playground/mcp-context-forge that referenced this pull request Sep 16, 2025
Fix edit tools
Signed-off-by: Vicky Kuo <vicky.kuo@ibm.com>
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.

4 participants