Create a new tool router session

Creates a new session for the tool router feature. This endpoint initializes a new session with specified toolkits and their authentication configurations. The session provides an isolated environment for testing and managing tool routing logic with scoped MCP server access.

Authentication

x-api-keystring
API key authentication

Request

This endpoint expects an object.
user_idstringRequired
The identifier of the user who is initiating the session, ideally a unique identifier from your database like a user ID or email address
toolkitsobjectOptional

Toolkit configuration - specify either enabled toolkits (allowlist) or disabled toolkits (denylist). Mutually exclusive.

auth_configsmap from strings to stringsOptional
The auth configs to use for the session. This will override the default behavior and use the given auth config when specific toolkits are being executed
connected_accountsmap from strings to stringsOptional
The connected accounts to use for the session. This will override the default behaviour and use the given connected account when specific toolkits are being executed
connectionsobjectOptional
Configuration for connection management settings
toolsobjectOptional
Configuration for tool overrides and filtering
executionobjectOptional
Configuration for workbench behavior including security restrictions and execution limits

Response

Session successfully created. Returns the session ID and MCP server URL for the created session.
session_idstringformat: "toolRouterSessionId"
The identifier of the session
mcpobject
tool_router_toolslist of enums
List of available tools in this session
Allowed values:
configobject
The session configuration including user, toolkits, and overrides

Errors