Tools in superglue are reusable workflows that you can execute on-demand, schedule, or trigger via webhooks. Each tool consists of sequential steps with built-in data transformations, loops, and error handling. Learn more about how tools fit into the bigger picture in our core concepts page.Documentation Index
Fetch the complete documentation index at: https://docs.superglue.cloud/llms.txt
Use this file to discover all available pages before exploring further.
- Via Agent
- Via UI
- Via SDK
The fastest way to create a tool is by talking to our agent. Describe what you want to accomplish and the agent will build the tool for you.Simple example:superglue will:The agent can build multi-step tools with:
- Identify which system to use (or create one if needed)
- Find the relevant API endpoint from the documentation
- Configure the API call with appropriate parameters
- Test it and make it available for execution
- Sequential API calls
- Data transformations between steps
- Loops for batch processing
- Error handling and retries
Try it now
Start building tools with our agent
Tool anatomy
Every tool consists of:Steps
Sequential API calls that fetch or modify data. Each step can reference data from previous steps.
Transformations
JavaScript functions that shape the step inputs and the final output. Ensures tool results adhere to response schemas.
Variables
Access data from previous steps, credentials, and input payload using
<<variable>> syntax.Step configuration
Each step in a tool represents a single API call with the following configuration:Basic structure
Variable syntax
Use<<variable>> to access dynamic values:
Access credentials:
JavaScript expressions must use the arrow function syntax
(sourceData) => .... Direct property access like <<userId>> works for simple variables, but not for nested properties or transformations.Data selector
Extract an array to iterate over:Whether a step loops through more than one request is determined by the data selector. If the data selector returns an Array, the request will execute once for each item in that array. The item of the current iteration is available in the config as
<<currentItem>> or accessible in code via sourceData.currentItem.Output transform
Shape the final output of the entire tool:Transform steps
Transform steps allow you to reshape data between API calls without making an external request. Use them when you need complex data transformations that don’t fit in adataSelector.
Basic structure
When to use transform steps
- Complex data reshaping between API calls
- Aggregating data from multiple previous steps
- Filtering or sorting data before the next request
- Preparing payloads in a specific format
Accessing transform results
Transform step results are wrapped in the same{ currentItem, data, success } envelope as request steps:
Transform steps do NOT have
systemId, url, method, headers, body, or pagination fields. They only have type: "transform" and transformCode.Special systems
PostgreSQL
Query databases using the postgres:// URL scheme:$1, $2, etc. placeholders to prevent SQL injection. Provide values in the params array, which can include static values or <<>> expressions.
Redis
Execute Redis commands using the redis:// (or rediss:// for TLS) URL scheme:command string and optional args array. You can also pass an array of commands to execute them as a pipeline in a single round-trip:
FTP/SFTP
Access files on FTP servers:list- List directory contentsget- Download file (auto-parses CSV/JSON/XML)put- Upload filedelete- Delete filerename- Rename/move filemkdir- Create directoryrmdir- Remove directoryexists- Check if file existsstat- Get file metadata
Error handling
Automatic retries
Failed steps can be automatically retried with exponential backoff
Validation
Response data is validated against response schemas if specified
Graceful degradation
Handle missing data with optional chaining and defaults in transformations
Input and output schemas
Define schemas to make your tools more robust: Input schema - Validates payload before execution:Next steps
Debug your tool
Test, troubleshoot, and fix issues with your tools
Deploy to production
Execute tools on-demand, scheduled, or via webhooks