Build custom tools from Python code and deploy as APIs
Custom Tools are deterministic Python workflows that assist your agents with fast, reliable operations. Instead of letting the agent figure out multi-step logic each time, you package it as a custom tool — predictable, testable, and reusable.Once deployed, custom tools become REST API endpoints and MCP tools — callable from agents, Claude conversations, external systems, or scheduled jobs.
Custom Tools are separate from agents. Agents are autonomous and use reasoning. Custom Tools are deterministic — same input, same output, every time.
Using Claude Code? Run /datagen:create-custom-tool for a guided workflow that handles schema design, implementation, testing, and deployment.
# List all custom toolsdatagen tools list# Show tool detailsdatagen tools show <uuid># Run a tooldatagen tools run <uuid> --input '{"campaign_id": "abc123"}'
from datagen_sdk import DatagenClientclient = DatagenClient()# Input: list of company domainsdomains = input_domains # From input schemaenriched = []for domain in domains: # Web research research = client.execute_tool("mcp_Perplexity_search", { "query": f"What does {domain} company do? Who are the founders?" }) # LinkedIn data company = client.execute_tool("mcp_LinkedIn_get_company", { "domain": domain }) enriched.append({ "domain": domain, "description": research.get("answer"), "employee_count": company.get("employeeCount"), "industry": company.get("industry") })# Output variablesresult = enrichedtotal_enriched = len(enriched)
Input Schema:
{ "type": "object", "properties": { "input_domains": { "type": "array", "items": {"type": "string"}, "description": "List of company domains to enrich" } }, "required": ["input_domains"]}