Repository: IBM/mcp-context-forge

Issue:
[Bug]: integrationType should only support REST, not MCP (Remove Integration Type: MCP) (draft)
Fix in API and UI

Remove "Integration Type" completely from all modals. Perhaps adding GraphQL or gRPC in the future.


Discussion:

Patch:
diff --git a/mcpgateway/admin.py b/mcpgateway/admin.py
index 4f4d4744..f389eeb8 100644
--- a/mcpgateway/admin.py
+++ b/mcpgateway/admin.py
@@ -1835,8 +1835,8 @@ async def admin_add_tool(
         >>> form_data_success = FormData([
         ...     ("name", "New_Tool"),
         ...     ("url", "http://new.tool.com"),
-        ...     ("requestType", "SSE"),
-        ...     ("integrationType", "MCP"),
+        ...     ("requestType", "GET"),
+        ...     ("integrationType", "REST"),
         ...     ("headers", '{"X-Api-Key": "abc"}')
         ... ])
         >>> mock_request_success = MagicMock(spec=Request)
@@ -1855,8 +1855,8 @@ async def admin_add_tool(
         >>> form_data_conflict = FormData([
         ...     ("name", "Existing_Tool"),
         ...     ("url", "http://existing.com"),
-        ...     ("requestType", "SSE"),
-        ...     ("integrationType", "MCP")
+        ...     ("requestType", "GET"),
+        ...     ("integrationType", "REST")
         ... ])
         >>> mock_request_conflict = MagicMock(spec=Request)
         >>> mock_request_conflict.form = AsyncMock(return_value=form_data_conflict)
@@ -1873,8 +1873,8 @@ async def admin_add_tool(
         >>> # Error path: Missing required field (Pydantic ValidationError)
         >>> form_data_missing = FormData([
         ...     ("url", "http://missing.com"),
-        ...     ("requestType", "SSE"),
-        ...     ("integrationType", "MCP")
+        ...     ("requestType", "GET"),
+        ...     ("integrationType", "REST")
         ... ])
         >>> mock_request_missing = MagicMock(spec=Request)
         >>> mock_request_missing.form = AsyncMock(return_value=form_data_missing)
@@ -1890,8 +1890,8 @@ async def admin_add_tool(
         >>> form_data_generic_error = FormData([
         ...     ("name", "Generic_Error_Tool"),
         ...     ("url", "http://generic.com"),
-        ...     ("requestType", "SSE"),
-        ...     ("integrationType", "MCP")
+        ...     ("requestType", "GET"),
+        ...     ("integrationType", "REST")
         ... ])
         >>> mock_request_generic_error = MagicMock(spec=Request)
         >>> mock_request_generic_error.form = AsyncMock(return_value=form_data_generic_error)
@@ -1912,6 +1912,17 @@ async def admin_add_tool(
     form = await request.form()
     logger.debug(f"Received form data: {dict(form)}")
 
+    integration_type = form.get("integrationType", "REST")
+    request_type = form.get("requestType")
+
+    if request_type is None:
+        if integration_type == "REST":
+            request_type = "GET"  # or any valid REST method default
+        elif integration_type == "MCP":
+            request_type = "SSE"
+        else:
+            request_type = "GET"
+
     # Parse tags from comma-separated string
     tags_str = form.get("tags", "")
     tags = [tag.strip() for tag in tags_str.split(",") if tag.strip()] if tags_str else []
@@ -1920,8 +1931,8 @@ async def admin_add_tool(
         "name": form.get("name"),
         "url": form.get("url"),
         "description": form.get("description"),
-        "request_type": form.get("requestType", "SSE"),
-        "integration_type": form.get("integrationType", "MCP"),
+        "request_type": request_type,
+        "integration_type": integration_type,
         "headers": json.loads(form.get("headers") or "{}"),
         "input_schema": json.loads(form.get("input_schema") or "{}"),
         "jsonpath_filter": form.get("jsonpath_filter", ""),
@@ -1949,6 +1960,7 @@ async def admin_add_tool(
     except ToolError as ex:
         return JSONResponse(content={"message": str(ex), "success": False}, status_code=500)
     except ValidationError as ex:  # This block should catch ValidationError
+
         logger.error(f"ValidationError in admin_add_tool: {str(ex)}")
         return JSONResponse(content=ErrorFormatter.format_validation_error(ex), status_code=422)
     except Exception as ex:
@@ -2018,9 +2030,11 @@ async def admin_edit_tool(
         >>> form_data_success = FormData([
         ...     ("name", "Updated_Tool"),
         ...     ("url", "http://updated.com"),
-        ...     ("is_inactive_checked", "false"),
-        ...     ("requestType", "SSE"),
-        ...     ("integrationType", "MCP")
+        ...     ("requestType", "GET"),
+        ...     ("integrationType", "REST"),
+        ...     ("headers", '{"X-Api-Key": "abc"}'),
+        ...     ("input_schema", '{}'),  # ✅ Required field
+        ...     ("description", "Sample tool")
         ... ])
         >>> mock_request_success = MagicMock(spec=Request, scope={"root_path": ""})
         >>> mock_request_success.form = AsyncMock(return_value=form_data_success)
@@ -2039,8 +2053,8 @@ async def admin_edit_tool(
         ...     ("name", "Inactive_Edit"),
         ...     ("url", "http://inactive.com"),
         ...     ("is_inactive_checked", "true"),
-        ...     ("requestType", "SSE"),
-        ...     ("integrationType", "MCP")
+        ...     ("requestType", "GET"),
+        ...     ("integrationType", "REST")
         ... ])
         >>> mock_request_inactive = MagicMock(spec=Request, scope={"root_path": "/api"})
         >>> mock_request_inactive.form = AsyncMock(return_value=form_data_inactive)
@@ -2056,8 +2070,8 @@ async def admin_edit_tool(
         >>> form_data_conflict = FormData([
         ...     ("name", "Conflicting_Name"),
         ...     ("url", "http://conflict.com"),
-        ...     ("requestType", "SSE"),
-        ...     ("integrationType", "MCP")
+        ...     ("requestType", "GET"),
+        ...     ("integrationType", "REST")
         ... ])
         >>> mock_request_conflict = MagicMock(spec=Request, scope={"root_path": ""})
         >>> mock_request_conflict.form = AsyncMock(return_value=form_data_conflict)
@@ -2074,8 +2088,8 @@ async def admin_edit_tool(
         >>> form_data_tool_error = FormData([
         ...     ("name", "Tool_Error"),
         ...     ("url", "http://toolerror.com"),
-        ...     ("requestType", "SSE"),
-        ...     ("integrationType", "MCP")
+        ...     ("requestType", "GET"),
+        ...     ("integrationType", "REST")
         ... ])
         >>> mock_request_tool_error = MagicMock(spec=Request, scope={"root_path": ""})
         >>> mock_request_tool_error.form = AsyncMock(return_value=form_data_tool_error)
@@ -2092,8 +2106,8 @@ async def admin_edit_tool(
         >>> form_data_validation_error = FormData([
         ...     ("name", "Bad_URL"),
         ...     ("url", "not-a-valid-url"),
-        ...     ("requestType", "SSE"),
-        ...     ("integrationType", "MCP")
+        ...     ("requestType", "GET"),
+        ...     ("integrationType", "REST")
         ... ])
         >>> mock_request_validation_error = MagicMock(spec=Request, scope={"root_path": ""})
         >>> mock_request_validation_error.form = AsyncMock(return_value=form_data_validation_error)
@@ -2109,8 +2123,8 @@ async def admin_edit_tool(
         >>> form_data_unexpected = FormData([
         ...     ("name", "Crash_Tool"),
         ...     ("url", "http://crash.com"),
-        ...     ("requestType", "SSE"),
-        ...     ("integrationType", "MCP")
+        ...     ("requestType", "GET"),
+        ...     ("integrationType", "REST")
         ... ])
         >>> mock_request_unexpected = MagicMock(spec=Request, scope={"root_path": ""})
         >>> mock_request_unexpected.form = AsyncMock(return_value=form_data_unexpected)
@@ -2139,7 +2153,7 @@ async def admin_edit_tool(
         "url": form.get("url"),
         "description": form.get("description"),
         "request_type": form.get("requestType", "SSE"),
-        "integration_type": form.get("integrationType", "MCP"),
+        "integration_type": form.get("integrationType", "REST"),
         "headers": json.loads(form.get("headers") or "{}"),
         "input_schema": json.loads(form.get("input_schema") or "{}"),
         "jsonpath_filter": form.get("jsonpathFilter", ""),
diff --git a/mcpgateway/schemas.py b/mcpgateway/schemas.py
index aa02fc6b..60ad937e 100644
--- a/mcpgateway/schemas.py
+++ b/mcpgateway/schemas.py
@@ -294,8 +294,8 @@ class ToolCreate(BaseModel):
         name (str): Unique name for the tool.
         url (Union[str, AnyHttpUrl]): Tool endpoint URL.
         description (Optional[str]): Tool description.
-        integration_type (Literal["MCP", "REST"]): Tool integration type. 'MCP' for MCP-compliant tools, 'REST' for REST integrations.
-        request_type (Literal["GET", "POST", "PUT", "DELETE", "SSE", "STDIO", "STREAMABLEHTTP"]): HTTP method to be used for invoking the tool.
+        integration_type (Literal["REST"]): Tool integration type for REST integrations.
+        request_type (Literal["GET", "POST", "PUT", "DELETE", "PATCH"]): HTTP method to be used for invoking the tool.
         headers (Optional[Dict[str, str]]): Additional headers to send when invoking the tool.
         input_schema (Optional[Dict[str, Any]]): JSON Schema for validating tool parameters. Alias 'inputSchema'.
         annotations (Optional[Dict[str, Any]]): Tool annotations for behavior hints such as title, readOnlyHint, destructiveHint, idempotentHint, openWorldHint.
@@ -309,7 +309,7 @@ class ToolCreate(BaseModel):
     name: str = Field(..., description="Unique name for the tool")
     url: Union[str, AnyHttpUrl] = Field(None, description="Tool endpoint URL")
     description: Optional[str] = Field(None, description="Tool description")
-    integration_type: Literal["MCP", "REST"] = Field("MCP", description="Tool integration type: 'MCP' for MCP-compliant tools, 'REST' for REST integrations")
+    integration_type: Literal["REST"] = Field("REST", description="'REST' for REST integrations")
     request_type: Literal["GET", "POST", "PUT", "DELETE", "PATCH", "SSE", "STDIO", "STREAMABLEHTTP"] = Field("SSE", description="HTTP method to be used for invoking the tool")
     headers: Optional[Dict[str, str]] = Field(None, description="Additional headers to send when invoking the tool")
     input_schema: Optional[Dict[str, Any]] = Field(default_factory=lambda: {"type": "object", "properties": {}}, description="JSON Schema for validating tool parameters", alias="inputSchema")
@@ -447,11 +447,11 @@ def validate_request_type(cls, v: str, info: ValidationInfo) -> str:
             ValueError: When value is unsafe
 
         Examples:
-            >>> # Test MCP integration types
+            >>> # Test REST integration types with valid method
             >>> from pydantic import ValidationInfo
-            >>> info = type('obj', (object,), {'data': {'integration_type': 'MCP'}})
-            >>> ToolCreate.validate_request_type('SSE', info)
-            'SSE'
+            >>> info = type('obj', (object,), {'data': {'integration_type': 'REST'}})
+            >>> ToolCreate.validate_request_type('POST', info)
+            'POST'
 
             >>> # Test REST integration types
             >>> info = type('obj', (object,), {'data': {'integration_type': 'REST'}})
@@ -467,24 +467,24 @@ def validate_request_type(cls, v: str, info: ValidationInfo) -> str:
             ...     "not allowed for REST" in str(e)
             True
 
-            >>> # Test invalid MCP type
-            >>> info = type('obj', (object,), {'data': {'integration_type': 'MCP'}})
+            >>> # Test invalid integration type
+            >>> info = type('obj', (object,), {'data': {'integration_type': 'INVALID'}})
             >>> try:
             ...     ToolCreate.validate_request_type('GET', info)
             ... except ValueError as e:
-            ...     "not allowed for MCP" in str(e)
+            ...     "Unknown integration type" in str(e)
             True
         """
-        data = info.data
-        integration_type = data.get("integration_type")
 
-        if integration_type == "MCP":
-            allowed = ["SSE", "STREAMABLEHTTP", "STDIO"]
-        else:  # REST
-            allowed = ["GET", "POST", "PUT", "DELETE", "PATCH"]
+        integration_type = info.data.get("integration_type")
 
+        if integration_type != "REST":
+            raise ValueError(f"Unknown integration type: {integration_type}")
+
+        allowed = ["GET", "POST", "PUT", "DELETE", "PATCH"]
         if v not in allowed:
-            raise ValueError(f"Request type '{v}' not allowed for {integration_type} integration")
+            raise ValueError(f"Request type '{v}' not allowed for REST. Only {allowed} methods are accepted.")
+
         return v
 
     @model_validator(mode="before")
@@ -565,8 +565,8 @@ class ToolUpdate(BaseModelWithConfigDict):
     name: Optional[str] = Field(None, description="Unique name for the tool")
     url: Optional[Union[str, AnyHttpUrl]] = Field(None, description="Tool endpoint URL")
     description: Optional[str] = Field(None, description="Tool description")
-    integration_type: Optional[Literal["MCP", "REST"]] = Field(None, description="Tool integration type")
-    request_type: Optional[Literal["GET", "POST", "PUT", "DELETE", "PATCH", "SSE", "STDIO", "STREAMABLEHTTP"]] = Field(None, description="HTTP method to be used for invoking the tool")
+    integration_type: Optional[Literal["REST"]] = Field(None, description="Tool integration type")
+    request_type: Optional[Literal["GET", "POST", "PUT", "DELETE", "PATCH"]] = Field(None, description="HTTP method to be used for invoking the tool")
     headers: Optional[Dict[str, str]] = Field(None, description="Additional headers to send when invoking the tool")
     input_schema: Optional[Dict[str, Any]] = Field(None, description="JSON Schema for validating tool parameters")
     annotations: Optional[Dict[str, Any]] = Field(None, description="Tool annotations for behavior hints")
@@ -677,11 +677,8 @@ def validate_request_type(cls, v: str, values: Dict[str, Any]) -> str:
             ValueError: When value is unsafe
         """
 
-        integration_type = values.data.get("integration_type", "MCP")
-        if integration_type == "MCP":
-            allowed = ["SSE", "STREAMABLEHTTP", "STDIO"]
-        else:  # REST
-            allowed = ["GET", "POST", "PUT", "DELETE", "PATCH"]
+        integration_type = values.data.get("integration_type", "REST")
+        allowed = ["GET", "POST", "PUT", "DELETE", "PATCH"]
 
         if v not in allowed:
             raise ValueError(f"Request type '{v}' not allowed for {integration_type} integration")
diff --git a/mcpgateway/templates/admin.html b/mcpgateway/templates/admin.html
index 0ef67b5f..03229ce3 100644
--- a/mcpgateway/templates/admin.html
+++ b/mcpgateway/templates/admin.html
@@ -1002,7 +1002,7 @@ <h3 class="text-lg font-bold mb-4 dark:text-gray-200">
                   class="mt-1 block w-full rounded-md border border-gray-300 dark:border-gray-700 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 dark:bg-gray-900 dark:placeholder-gray-300 dark:text-gray-300"
                   onchange="updateRequestTypeOptions()"
                 >
-                  <option value="MCP">MCP</option>
+
                   <option value="REST">REST</option>
                 </select>
               </div>
@@ -2676,7 +2676,7 @@ <h3 class="text-lg font-medium text-gray-900 dark:text-gray-100">
                         id="edit-tool-type"
                         class="mt-1 block w-full rounded-md border border-gray-300 dark:border-gray-600 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 dark:bg-gray-900 dark:placeholder-gray-300 dark:text-gray-300"
                       >
-                        <option value="MCP">MCP</option>
+
                         <option value="REST">REST</option>
                       </select>
                     </div>


Test patch:
diff --git a/docs/docs/testing/basic.md b/docs/docs/testing/basic.md
index 1897a4db..289e585b 100644
--- a/docs/docs/testing/basic.md
+++ b/docs/docs/testing/basic.md
@@ -119,7 +119,7 @@ curl -s -k -X POST $BASE_URL/tools \
         "url": "'"$LOCAL_MCP_TOOL_URL"'",
         "description": "Returns current time",
         "request_type": "POST",
-        "integration_type": "MCP",
+        "integration_type": "REST",
         "input_schema": {
           "type": "object",
           "properties": {
diff --git a/tests/security/test_input_validation.py b/tests/security/test_input_validation.py
index be56becd..160b6367 100644
--- a/tests/security/test_input_validation.py
+++ b/tests/security/test_input_validation.py
@@ -495,12 +495,12 @@ def test_tool_create_request_type_validation(self):
         """Test request type validation based on integration type."""
         logger.debug("Testing tool request type validation")
 
-        # MCP integration types
-        mcp_valid = ["SSE", "STREAMABLEHTTP", "STDIO"]
-        for req_type in mcp_valid:
-            logger.debug(f"Testing MCP request type: {req_type}")
-            tool = ToolCreate(name=self.VALID_TOOL_NAME, url=self.VALID_URL, integration_type="MCP", request_type=req_type)
-            assert tool.request_type == req_type
+        # # MCP integration types
+        # mcp_valid = ["SSE", "STREAMABLEHTTP", "STDIO"]
+        # for req_type in mcp_valid:
+        #     logger.debug(f"Testing MCP request type: {req_type}")
+        #     tool = ToolCreate(name=self.VALID_TOOL_NAME, url=self.VALID_URL, integration_type="MCP", request_type=req_type)
+        #     assert tool.request_type == req_type
 
         # REST integration types
         rest_valid = ["GET", "POST", "PUT", "DELETE", "PATCH"]
@@ -1738,7 +1738,7 @@ def test_optional_field_defaults(self):
 
         # Check defaults
         assert tool.description is None
-        assert tool.integration_type == "MCP"
+        assert tool.integration_type == "REST"
         assert tool.request_type == "SSE"
         assert tool.headers is None or tool.headers == {}
         assert tool.input_schema is not None  # Has default
diff --git a/tests/unit/mcpgateway/services/test_gateway_service.py b/tests/unit/mcpgateway/services/test_gateway_service.py
index 4fe06a14..988f7da6 100644
--- a/tests/unit/mcpgateway/services/test_gateway_service.py
+++ b/tests/unit/mcpgateway/services/test_gateway_service.py
@@ -311,8 +311,8 @@ async def test_register_gateway_with_tools(self, gateway_service, test_db, monke
             ToolCreate(
                 name="test_tool",
                 description="A test tool",
-                integration_type="MCP",
-                request_type="SSE",
+                integration_type="REST",
+                request_type="POST",
                 input_schema={"type": "object"}
             )
         ]
@@ -555,8 +555,8 @@ async def test_register_gateway_with_existing_tools(self, gateway_service, test_
             ToolCreate(
                 name="existing_tool",  # This tool already exists
                 description="An existing tool",
-                integration_type="MCP",
-                request_type="SSE",
+                integration_type="REST",
+                request_type="POST",
                 input_schema={"type": "object"}
             )
         ]
@@ -1010,15 +1010,15 @@ async def test_update_gateway_url_change_with_tools(self, gateway_service, mock_
             ToolCreate(
                 name="existing_tool",
                 description="Updated tool",
-                integration_type="MCP",
-                request_type="SSE",
+                integration_type="REST",
+                request_type="POST",
                 input_schema={"type": "object"}
             ),
             ToolCreate(
                 name="new_tool",
                 description="Brand new tool",
-                integration_type="MCP",
-                request_type="SSE",
+                integration_type="REST",
+                request_type="POST",
                 input_schema={"type": "object"}
             )
         ]
diff --git a/tests/unit/mcpgateway/services/test_tool_service.py b/tests/unit/mcpgateway/services/test_tool_service.py
index fe166d49..df9c4ee8 100644
--- a/tests/unit/mcpgateway/services/test_tool_service.py
+++ b/tests/unit/mcpgateway/services/test_tool_service.py
@@ -205,7 +205,7 @@ async def test_register_tool(self, tool_service, mock_tool, test_db):
                 name="test-gateway-test-tool",
                 url="http://example.com/tools/test",
                 description="A test tool",
-                integration_type="MCP",
+                integration_type="REST",
                 request_type="POST",
                 headers={"Content-Type": "application/json"},
                 input_schema={"type": "object", "properties": {"param": {"type": "string"}}},
@@ -236,8 +236,8 @@ async def test_register_tool(self, tool_service, mock_tool, test_db):
             name="test-gateway-test-tool",
             url="http://example.com/tools/test",
             description="A test tool",
-            integration_type="MCP",
-            request_type="SSE",
+            integration_type="REST",
+            request_type="POST",
             headers={"Content-Type": "application/json"},
             input_schema={"type": "object", "properties": {"param": {"type": "string"}}},
         )
@@ -253,7 +253,7 @@ async def test_register_tool(self, tool_service, mock_tool, test_db):
         # Verify result
         assert result.name == "test-gateway-test-tool"
         assert result.url == "http://example.com/tools/test"
-        assert result.integration_type == "MCP"
+        assert result.integration_type == "REST"
         assert result.enabled is True
 
         # Verify notification
@@ -272,8 +272,8 @@ async def test_register_tool_with_gateway_id(self, tool_service, mock_tool, test
             name="test_tool",  # Same name as mock_tool
             url="http://example.com/tools/new",
             description="A new tool",
-            integration_type="MCP",
-            request_type="SSE",
+            integration_type="REST",
+            request_type="POST",
             gateway_id="1",
         )
 
@@ -320,8 +320,8 @@ async def test_register_tool_name_conflict(self, tool_service, mock_tool, test_d
             name="test_tool",  # Same name as mock_tool
             url="http://example.com/tools/new",
             description="A new tool",
-            integration_type="MCP",
-            request_type="SSE",
+            integration_type="REST",
+            request_type="POST",
         )
 
         # Should raise IntegrityError due to UNIQUE constraint failure
@@ -346,8 +346,8 @@ async def test_register_inactive_tool_name_conflict(self, tool_service, mock_too
             name="test_tool",  # Same name as mock_tool
             url="http://example.com/tools/new",
             description="A new tool",
-            integration_type="MCP",
-            request_type="SSE",
+            integration_type="REST",
+            request_type="POST",
         )
 
         # Should raise IntegrityError due to UNIQUE constraint failure
@@ -374,8 +374,8 @@ async def test_register_tool_db_integrity_error(self, tool_service, test_db):
             name="test_tool",
             url="http://example.com/tools/test",
             description="A test tool",
-            integration_type="MCP",
-            request_type="SSE",
+            integration_type="REST",
+            request_type="POST",
         )
 
         # Should raise IntegrityError
@@ -1033,14 +1033,14 @@ async def test_update_tool_extra_fields(self, tool_service, mock_tool, test_db):
 
         # Create update request
         tool_update = ToolUpdate(
-            integration_type="MCP", request_type="STREAMABLEHTTP", headers={"key": "value"}, input_schema={"key2": "value2"}, annotations={"key3": "value3"}, jsonpath_filter="test_filter"
+            integration_type="REST", request_type="POST", headers={"key": "value"}, input_schema={"key2": "value2"}, annotations={"key3": "value3"}, jsonpath_filter="test_filter"
         )
 
         # The service wraps the exception in ToolError
         result = await tool_service.update_tool(test_db, "999", tool_update)
 
-        assert result.integration_type == "MCP"
-        assert result.request_type == "STREAMABLEHTTP"
+        assert result.integration_type == "REST"
+        assert result.request_type == "POST"
         assert result.headers == {"key": "value"}
         assert result.input_schema == {"key2": "value2"}
         assert result.annotations == {"key3": "value3"}
diff --git a/tests/unit/mcpgateway/test_admin.py b/tests/unit/mcpgateway/test_admin.py
index 6bddf64a..4b3ccaa8 100644
--- a/tests/unit/mcpgateway/test_admin.py
+++ b/tests/unit/mcpgateway/test_admin.py
@@ -387,11 +387,23 @@ async def test_admin_add_tool_with_invalid_json(self, mock_register_tool, mock_r
     async def test_admin_add_tool_with_tool_error(self, mock_register_tool, mock_request, mock_db):
         """Test adding tool with ToolError."""
         mock_register_tool.side_effect = ToolError("Tool service error")
+        mock_form = {
+        "name": "test-tool",
+        "url": "http://example.com",
+        "description": "Test tool",
+        "requestType": "GET",
+        "integrationType": "REST",
+        "headers": "{}",  # must be a valid JSON string
+        "input_schema": "{}",
+         }
+
+        mock_request.form = AsyncMock(return_value=mock_form)
 
         result = await admin_add_tool(mock_request, mock_db, "test-user")
 
         assert isinstance(result, JSONResponse)
         assert result.status_code == 500
+
         assert json.loads(result.body)["success"] is False
 
     @patch.object(ToolService, "register_tool")
@@ -412,6 +424,7 @@ async def test_admin_add_tool_with_missing_fields(self, mock_register_tool, mock
         assert result.status_code == 422
 
     @patch.object(ToolService, "update_tool")
+    # @pytest.mark.skip("Need to investigate")
     async def test_admin_edit_tool_all_error_paths(self, mock_update_tool, mock_request, mock_db):
         """Test editing tool with all possible error paths."""
         tool_id = "tool-1"
@@ -419,26 +432,38 @@ async def test_admin_edit_tool_all_error_paths(self, mock_update_tool, mock_requ
         # IntegrityError should return 409 with JSON body
         # Third-Party
         from sqlalchemy.exc import IntegrityError
-
+        from starlette.datastructures import FormData
+
+        mock_request.form = AsyncMock(return_value=FormData([
+        ("name", "Tool_Name_1"),
+        ("url", "http://example.com"),
+        ("requestType", "GET"),
+        ("integrationType", "REST"),
+        ("headers", "{}"),
+        ("input_schema", "{}")
+        ]))
         mock_update_tool.side_effect = IntegrityError("Integrity constraint", {}, Exception("Duplicate key"))
         result = await admin_edit_tool(tool_id, mock_request, mock_db, "test-user")
+
         assert result.status_code == 409
 
         # ToolError should return 500 with JSON body
         mock_update_tool.side_effect = ToolError("Tool configuration error")
         result = await admin_edit_tool(tool_id, mock_request, mock_db, "test-user")
         assert result.status_code == 500
-        data = result.body
-        assert b"Tool configuration error" in data
+        assert b"Tool configuration error" in result.body
+
 
         # Generic Exception should return 500 with JSON body
         mock_update_tool.side_effect = Exception("Unexpected error")
         result = await admin_edit_tool(tool_id, mock_request, mock_db, "test-user")
+
         assert result.status_code == 500
-        data = result.body
-        assert b"Unexpected error" in data
+        assert b"Unexpected error" in result.body
 
     @patch.object(ToolService, "update_tool")
+
+    # @pytest.mark.skip("Need to investigate")
     async def test_admin_edit_tool_with_empty_optional_fields(self, mock_update_tool, mock_request, mock_db):
         """Test editing tool with empty optional fields."""
         # Override form with empty optional fields and valid name
@@ -451,6 +476,8 @@ async def test_admin_edit_tool_with_empty_optional_fields(self, mock_update_tool
                 "input_schema": "",
                 "jsonpathFilter": "",
                 "auth_type": "",
+                "requestType": "GET",
+                "integrationType": "REST"
             }
         )
         mock_request.form = AsyncMock(return_value=form_data)