Skip to main content
Glama

create_connection

Establish a new app connection in Automatisch by providing app identifier, connection name, and required credentials to enable workflow automation.

Instructions

Create a new app connection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appKeyYesApp identifier (e.g., 'slack', 'github')
nameYesConnection name
credentialsYesApp-specific credentials and configuration

Implementation Reference

  • MCP tool handler for 'create_connection': invokes the API helper method and formats the response as JSON text.
    case "create_connection":
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(await main.api.createConnection(args), null, 2)
          }
        ]
      };
  • Input schema definition for the 'create_connection' tool, specifying required parameters: appKey, name, credentials.
    {
      name: "create_connection",
      description: "Create a new app connection",
      inputSchema: {
        type: "object",
        properties: {
          appKey: {
            type: "string",
            description: "App identifier (e.g., 'slack', 'github')"
          },
          name: {
            type: "string",
            description: "Connection name"
          },
          credentials: {
            type: "object",
            description: "App-specific credentials and configuration"
          }
        },
        required: ["appKey", "name", "credentials"]
      }
    },
  • API helper method 'createConnection' that is called by the tool handler (currently a placeholder for the core implementation logic).
    createConnection: async function(data: any) {
      // ... copy createConnection logic from index.ts ...
    },
  • src/handlers.ts:32-279 (registration)
    Registration of the CallToolRequestHandler which dispatches to specific tool cases, including 'create_connection'.
              type: "object",
              properties: {
                workflowId: {
                  type: "string",
                  description: "Workflow ID to retrieve"
                }
              },
              required: ["workflowId"]
            }
          },
          {
            name: "create_workflow",
            description: "Create a new workflow",
            inputSchema: {
              type: "object",
              properties: {
                name: {
                  type: "string",
                  description: "Workflow name"
                },
                description: {
                  type: "string",
                  description: "Workflow description"
                },
                active: {
                  type: "boolean",
                  description: "Whether workflow should be active",
                  default: false
                }
              },
              required: ["name"]
            }
          },
          {
            name: "update_workflow",
            description: "Update an existing workflow",
            inputSchema: {
              type: "object",
              properties: {
                workflowId: {
                  type: "string",
                  description: "Workflow ID to update"
                },
                name: {
                  type: "string",
                  description: "New workflow name"
                },
                description: {
                  type: "string",
                  description: "New workflow description"
                },
                active: {
                  type: "boolean",
                  description: "Workflow active status"
                }
              },
              required: ["workflowId"]
            }
          },
          {
            name: "delete_workflow",
            description: "Delete a workflow",
            inputSchema: {
              type: "object",
              properties: {
                workflowId: {
                  type: "string",
                  description: "Workflow ID to delete"
                }
              },
              required: ["workflowId"]
            }
          },
          {
            name: "list_connections",
            description: "List all app connections",
            inputSchema: {
              type: "object",
              properties: {
                appKey: {
                  type: "string",
                  description: "Filter by specific app"
                }
              }
            }
          },
          {
            name: "create_connection",
            description: "Create a new app connection",
            inputSchema: {
              type: "object",
              properties: {
                appKey: {
                  type: "string",
                  description: "App identifier (e.g., 'slack', 'github')"
                },
                name: {
                  type: "string",
                  description: "Connection name"
                },
                credentials: {
                  type: "object",
                  description: "App-specific credentials and configuration"
                }
              },
              required: ["appKey", "name", "credentials"]
            }
          },
          {
            name: "list_executions",
            description: "List workflow executions",
            inputSchema: {
              type: "object",
              properties: {
                workflowId: {
                  type: "string",
                  description: "Filter by workflow ID"
                },
                status: {
                  type: "string",
                  enum: ["success", "failure", "running"],
                  description: "Filter by execution status"
                },
                limit: {
                  type: "number",
                  description: "Limit number of results"
                }
              }
            }
          },
          {
            name: "get_available_apps",
            description: "Get list of available apps and their capabilities",
            inputSchema: {
              type: "object",
              properties: {
                category: {
                  type: "string",
                  description: "Filter by app category"
                }
              }
            }
          },
          {
            name: "test_workflow",
            description: "Test a workflow with sample data",
            inputSchema: {
              type: "object",
              properties: {
                workflowId: {
                  type: "string",
                  description: "Workflow ID to test"
                },
                testData: {
                  type: "object",
                  description: "Sample data for testing"
                }
              },
              required: ["workflowId"]
            }
          }
        ]
      };
    });
    
    // List available resources
    server.setRequestHandler(ListResourcesRequestSchema, async () => {
      return {
        resources: [
          {
            uri: "automatisch://workflows",
            mimeType: "application/json",
            name: "Workflows Overview",
            description: "Overview of all workflows and their status"
          },
          {
            uri: "automatisch://connections",
            mimeType: "application/json",
            name: "App Connections",
            description: "List of configured app connections"
          },
          {
            uri: "automatisch://apps",
            mimeType: "application/json",
            name: "Available Apps",
            description: "Catalog of available apps and integrations"
          },
          {
            uri: "automatisch://executions/recent",
            mimeType: "application/json",
            name: "Recent Executions",
            description: "Recent workflow executions and their results"
          }
        ]
      };
    });
    
    // Handle resource reading
    server.setRequestHandler(ReadResourceRequestSchema, async (request: any) => {
      const { uri } = request.params;
      switch (uri) {
        case "automatisch://workflows":
          return {
            contents: [
              {
                uri,
                mimeType: "application/json",
                text: JSON.stringify(await main.api.getWorkflowsOverview(), null, 2)
              }
            ]
          };
        case "automatisch://connections":
          return {
            contents: [
              {
                uri,
                mimeType: "application/json",
                text: JSON.stringify(await main.api.getConnectionsOverview(), null, 2)
              }
            ]
          };
        case "automatisch://apps":
          return {
            contents: [
              {
                uri,
                mimeType: "application/json",
                text: JSON.stringify(await main.api.getAvailableApps(), null, 2)
              }
            ]
          };
        case "automatisch://executions/recent":
          return {
            contents: [
              {
                uri,
                mimeType: "application/json",
                text: JSON.stringify(await main.api.getRecentExecutions(), null, 2)
              }
            ]
          };
        default:
          throw new McpError(ErrorCode.InvalidRequest, `Unknown resource: ${uri}`);
      }
    });
    
    // Handle tool calls
    server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
  • Initializes the 'api' object on the main server instance with API helpers, providing 'createConnection' method.
    public api = apiHelpers(this);

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/milisp/automatisch-mcp-server'

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