create_connection
Set up new data connections in Polytomic by specifying name, type, and configuration for sources like PostgreSQL, Salesforce, or Snowflake.
Instructions
Create a new data connection in Polytomic.
Args: name: Name for the connection type: Connection type (e.g. 'postgresql', 'salesforce', 'snowflake') configuration: JSON string with connection config (varies by type)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| type | Yes | ||
| configuration | Yes |
Implementation Reference
- src/polytomic_mcp/server.py:79-97 (handler)The 'create_connection' tool handler is implemented in 'src/polytomic_mcp/server.py'. It validates input as a tool using '@mcp.tool()', constructs the API request body, and calls the 'polytomic_request' helper to perform the POST request.
async def create_connection( name: str, type: str, configuration: str, ) -> str: """Create a new data connection in Polytomic. Args: name: Name for the connection type: Connection type (e.g. 'postgresql', 'salesforce', 'snowflake') configuration: JSON string with connection config (varies by type) """ body = { "name": name, "type": type, "configuration": json.loads(configuration), } result = await polytomic_request("/connections", method="POST", body=body) return json.dumps(result, indent=2)