Skip to main content
Glama

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
NameRequiredDescriptionDefault
nameYes
typeYes
configurationYes

Implementation Reference

  • 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)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/therevenueengineer/polytomic-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server