Skip to main content
All types are auto-generated from the OpenAPI specification. This reference covers the most commonly used types.

Tool types

Tool

A multi-step workflow tool that executes protocol-specific operations.
interface Tool {
  id: string;
  name?: string;
  version?: string;
  instruction?: string;
  inputSchema?: Record<string, any>;
  outputSchema?: Record<string, any>;
  steps: ToolStep[];
  outputTransform?: string;
  createdAt?: string;
  updatedAt?: string;
}
Fields:
  • id - Unique identifier
  • steps - Ordered execution steps (min: 1)
  • name - Display name
  • version - Semantic version (major.minor.patch)
  • instruction - Human-readable description
  • inputSchema - JSON Schema for tool inputs
  • outputSchema - JSON Schema for tool outputs
  • outputTransform - JavaScript function for final transformation: (sourceData) => expression
  • createdAt - Creation timestamp
  • updatedAt - Last update timestamp

ToolStep

A single execution step supporting multiple protocols (HTTP/HTTPS, Postgres, FTP/SFTP).
interface ToolStep {
  id: string;
  url: string;
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
  systemId: string;
  instruction?: string;
  queryParams?: Record<string, string>;
  headers?: Record<string, string>;
  body?: string;
  dataSelector?: string;
  modify?: boolean;
  failureBehavior?: "fail" | "continue";
  pagination?: Pagination;
}
Fields:
  • id - Unique identifier
  • url - Full URL with protocol (e.g., https://api.example.com, postgres://host:5432/db, ftp://host/path)
  • method - HTTP method (use POST for non-HTTP protocols)
  • systemId - System to use for credentials and documentation
  • instruction - What this step does
  • queryParams - URL query params (HTTP only), supports template expressions
  • headers - HTTP headers (HTTP only), supports template expressions
  • body - Request body (protocol-specific), supports template expressions
  • dataSelector - JavaScript function to select data: (sourceData) => expression
  • modify - Whether step can be modified by self-healing
  • failureBehavior - "fail" stops execution, "continue" proceeds to next step
  • pagination - Pagination configuration (HTTP only)
Template Expressions: Use <<(sourceData) => ...>> syntax to reference previous step outputs:
{
  "query": "<<(sourceData) => sourceData.step1.userId>>",
  "limit": "<<(sourceData) => sourceData.inputs.limit>>"
}

Run types

Run

Represents a tool execution with status, results, and metadata.
interface Run {
  runId: string;
  toolId: string;
  status: "running" | "success" | "failed" | "aborted";
  tool?: {
    id: string;
    name?: string;
    version?: string;
  };
  toolPayload?: {
    inputs?: Record<string, any>;
    credentials?: Record<string, string>;
    options?: Record<string, any>;
  };
  data?: any;
  error?: string;
  stepResults?: RunStepResultsItem[];
  options?: Record<string, any>;
  requestSource?: string;
  traceId?: string;
  metadata: RunMetadata;
}
Fields:
  • runId - Unique run identifier
  • toolId - ID of executed tool
  • status - Execution status: running, success, failed, aborted
  • tool - Tool metadata (not full config)
  • toolPayload - Inputs/credentials/options provided at runtime
  • data - Tool execution results (only when status is success)
  • error - Error message (only when status is failed or aborted)
  • stepResults - Results from each execution step
  • options - Execution options used
  • requestSource - Where run was initiated
  • traceId - Trace ID for debugging
  • metadata - Timing and duration info (see RunMetadata)

RunMetadata

Timing information for a run.
interface RunMetadata {
  startedAt?: string;
  completedAt?: string;
  durationMs?: number;
}
Fields:
  • startedAt - ISO timestamp when run started
  • completedAt - ISO timestamp when run finished (only present when status is success, failed, or aborted)
  • durationMs - Execution duration in milliseconds

RunRequest

Configuration for executing a tool.
interface RunRequest {
  runId?: string;
  inputs?: Record<string, any>;
  credentials?: Record<string, string>;
  options?: {
    async?: boolean;
    timeout?: number;
    webhookUrl?: string;
    traceId?: string;
  };
}
Fields:
  • runId - Pre-generated run ID (optional, for idempotency)
  • inputs - Tool-specific input parameters
  • credentials - Runtime credentials (not persisted, overrides stored credentials)
  • options - Execution options:
    • async - If true, return immediately (202) and execute async. If false, wait for completion (200)
    • timeout - Request timeout in seconds (sync only)
    • webhookUrl - URL to POST completion notification, or tool:toolId to chain tools
    • traceId - Custom trace ID for log tracking

RunStepResultsItem

Result from a single step execution.
interface RunStepResultsItem {
  stepId: string;
  success: boolean;
  data?: any;
  error?: string;
}
Fields:
  • stepId - Which step this result is for
  • success - Whether the step completed successfully
  • data - API response data (if successful)
  • error - Error message (if failed)

Pagination

Pagination

Pagination configuration for HTTP/HTTPS requests.
interface Pagination {
  type: "offset" | "cursor";
  pageSize?: string;
  cursorPath?: string;
  stopCondition?: string;
}
Fields:
  • type - Pagination type: "offset" or "cursor"
  • pageSize - Items per page (available as <<(sourceData) => sourceData.limit>>)
  • cursorPath - JSONPath to extract next page cursor (e.g., "meta.next_cursor")
  • stopCondition - JavaScript function to determine when to stop: (response, pageInfo) => boolean
    • response - Object with {data: ..., headers: ...}
    • pageInfo - Object with {page, offset, cursor, totalFetched}
    • Return true to STOP, false to continue

Response types

ListTools200

Response from listTools().
interface ListTools200 {
  data?: Tool[];
  page?: number;
  limit?: number;
  total?: number;
  hasMore?: boolean;
}
Fields:
  • data - Array of Tool objects
  • page - Current page number
  • limit - Items per page
  • total - Total number of items
  • hasMore - Whether more pages exist

ListRuns200

Response from listRuns().
interface ListRuns200 {
  data?: Run[];
  page?: number;
  limit?: number;
  total?: number;
  hasMore?: boolean;
}
Fields:
  • data - Array of Run objects
  • page - Current page number
  • limit - Items per page
  • total - Total number of items
  • hasMore - Whether more pages exist

Enums

RunStatus

type RunStatus = "running" | "success" | "failed" | "aborted";

ToolStepMethod

type ToolStepMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";

ToolStepFailureBehavior

type ToolStepFailureBehavior = "fail" | "continue";