test_connection
Verify connectivity with the SD Elements API to ensure integration with the security development lifecycle platform hosted on the Model Context Protocol server.
Instructions
Test the connection to SD Elements API
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The MCP tool handler for 'test_connection', decorated with @mcp.tool() for registration. It tests the API connection using api_client.test_connection() and returns a JSON result with success status, host, and message.@mcp.tool() async def test_connection(ctx: Context) -> str: """Test the connection to SD Elements API. Use this to verify API connectivity and credentials, not for making API calls.""" global api_client if api_client is None: api_client = init_api_client() success = api_client.test_connection() result = { "connection_successful": success, "host": api_client.host, "message": "Connection successful" if success else "Connection failed" } return json.dumps(result, indent=2)