Skip to main content

Documentation Index

Fetch the complete documentation index at: https://datagen.dev/llms.txt

Use this file to discover all available pages before exploring further.

Code Execution

executeCode

Execute Python code with MCP tool integration in a remote sandbox.
ParameterTypeRequiredDefaultDescription
scriptstringYesPython code to execute
namestringNoDescriptive name for tracking
descriptionstringNoBrief description of what the code does
session_idstringNoSession ID to group related executions
input_varsobjectNoVariables available in the script
output_varsobjectNoExpected output variables and types
required_toolsstring[]NoRequired MCP tools (e.g., ["mcp_Supabase_list_projects"])
additional_importsstring[]NoPyPI packages to import (package names only)
localbooleanNoRun locally (true) or in E2B sandbox (false)
mcp_server_namesstring[]NoMCP servers to spin up (reduces startup time)
timeoutnumberNo300Execution timeout in seconds (30-300)
required_secretsstring[]NoSecret names to inject as Python variables
Notes: Supports Python 3.12, synchronous code only. Use httpx for HTTP requests (not requests). Use ThreadPoolExecutor for I/O-bound workloads.

Custom Tool Management

createCustomTool

Deploy a Python workflow as a reusable API endpoint.
ParameterTypeRequiredDefaultDescription
scriptstringYesPython code to deploy
deployment_namestringYesAPI name (e.g., sync_supabase_to_heyreach)
descriptionstringYesWhat the custom tool does
input_schemaobjectNoOpenAPI/JSON Schema for input validation
output_variablesstring[]NoOutput variable names (e.g., ["result", "status"])
required_toolsstring[]NoRequired MCP tools
additional_importsstring[]NoPython packages (names only, no versions)
deployment_type"private" | "public"No"private"Visibility
is_code_publicbooleanNofalseWhether source code is visible when public
localbooleanNoRun locally or in E2B sandbox
mcp_server_namesstring[]NoMCP server names for tools
default_input_varsobjectNoDefault values for input variables
required_secretsstring[]NoSecret names from secret management
Returns: deployment_uuid on success.

updateCustomTool

Update an existing custom tool. Only provided fields are updated.
ParameterTypeRequiredDefaultDescription
custom_tool_uuidstringYesUUID of the tool to update
namestringNoUpdated name
descriptionstringNoUpdated description
final_codestringNoUpdated Python code
input_schemaobjectNoUpdated input schema
output_variablesstring[]NoUpdated output variable names
default_input_varsobjectNoUpdated default input values
additional_importsstring[]NoUpdated Python imports
expected_toolsstring[]NoUpdated required MCP tools
required_secretsstring[]NoUpdated required secrets
is_code_publicbooleanNoToggle source code visibility
deployment_type"private" | "public"NoToggle deployment visibility
mcp_server_namesstring[]NoUpdated MCP server names

getCustomToolDetails

Get full specs, code, input examples, and curl commands for a custom tool.
ParameterTypeRequiredDefaultDescription
custom_tool_uuidstringYesUUID of the custom tool
briefbooleanNofalseTrue for essential info only (name, description, schemas)

submitCustomToolRun

Execute a deployed custom tool asynchronously. Returns a run_uuid to monitor with checkRunStatus.
ParameterTypeRequiredDefaultDescription
custom_tool_uuidstringYesUUID of the custom tool to execute
input_varsobjectNoInput data (e.g., {"url": "https://example.com", "count": 10})

checkRunStatus

Monitor the progress and results of a custom tool run with automatic polling.
ParameterTypeRequiredDefaultDescription
run_uuidstringNoRun UUID from submitCustomToolRun
custom_tool_uuidstringNoCustom tool UUID to find the most recent run
timeout_secondsnumberNo180Max wait time (max 600)
poll_interval_secondsnumberNo5Seconds between checks (2-30)
Provide either run_uuid or custom_tool_uuid.

Tool Discovery & Execution

searchTools

Find tools by functionality, keywords, or provider.
ParameterTypeRequiredDefaultDescription
querystringYesWhat you want to accomplish (e.g., “send email”)
providerstringNoFilter by provider (e.g., “Supabase”, “GitHub”)
limitnumberNo10Max results (1-100)
offsetnumberNo0Skip N results for pagination

getToolDetails

Get comprehensive documentation for a specific tool.
ParameterTypeRequiredDefaultDescription
tool_namestringYesExact tool name (e.g., mcp_Supabase_execute_sql)

executeTool

Execute any MCP or default tool by its alias name.
ParameterTypeRequiredDefaultDescription
tool_alias_namestringYesTool alias (e.g., mcp_github_search_repositories)
parametersobjectNoParameters as key-value pairs

MCP Server Management

addRemoteMcpServer

Connect an external MCP server. Supports template-based (with auto OAuth) or manual URL.
ParameterTypeRequiredDefaultDescription
template_idstringNoTemplate ID for pre-configured servers (e.g., linear-mcp)
server_namestringNoDisplay name (CamelCase, e.g., GoogleDrive)
server_urlstringNoServer endpoint URL
credentialsobjectNoAPI keys/tokens required by the template
Provide either template_id or server_name + server_url.

searchBuiltInServers

Browse pre-configured MCP server templates.
ParameterTypeRequiredDefaultDescription
namestringNoFilter by name (case-insensitive substring)

getBuiltInServerDetails

Get full configuration details for a built-in server template.
ParameterTypeRequiredDefaultDescription
template_idstringYesTemplate ID from searchBuiltInServers

checkRemoteMcpOauthStatus

Poll for OAuth completion after receiving an auth URL from addRemoteMcpServer.
ParameterTypeRequiredDefaultDescription
flow_idstringYesOAuth flow ID from addRemoteMcpServer
timeout_secondsnumberNo120Max wait time (max 300)

ReAuthRemoteMcpServer

Reauthenticate an existing MCP server with expired OAuth tokens.
ParameterTypeRequiredDefaultDescription
server_namestringYesServer name (CamelCase, e.g., GitHub)

updateRemoteMcpServer

Update an existing MCP server’s URL and credentials.
ParameterTypeRequiredDefaultDescription
server_namestringYesServer name (CamelCase)
server_urlstringYesNew endpoint URL
env_argsobjectYesUpdated environment variables/config

Utilities

datagen-sdk-doc

Fetch the DataGen Python SDK documentation from GitHub. Returns the README content without images. Parameters: None