Skip to main content
POST
/
tools
Create a tool
curl --request POST \
  --url https://api.superglue.ai/v1/tools \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "my-custom-tool",
  "name": "Web Search",
  "steps": [
    {
      "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "config": {
        "url": "https://api.example.com/search",
        "method": "GET",
        "queryParams": {
          "q": "<<(sourceData) => sourceData.query>>",
          "limit": 10
        },
        "headers": {
          "Content-Type": "application/json",
          "Authorization": "Bearer <<(sourceData) => sourceData.credentials.apiKey>>"
        },
        "body": "{\"query\": \"<<(sourceData) => sourceData.query>>\"}",
        "systemId": "3f7c8d9e-1a2b-4c5d-8e9f-0a1b2c3d4e5f"
      },
      "instruction": "Fetch user details from the API",
      "modify": false,
      "dataSelector": "(sourceData) => sourceData.data.items",
      "failureBehavior": "fail"
    }
  ],
  "instruction": "Search the web for the given query and return relevant results",
  "inputSchema": {},
  "outputSchema": {},
  "outputTransform": "<string>",
  "folder": "integrations/payments"
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "steps": [
    {
      "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "config": {
        "url": "https://api.example.com/search",
        "method": "GET",
        "queryParams": {
          "q": "<<(sourceData) => sourceData.query>>",
          "limit": 10
        },
        "headers": {
          "Content-Type": "application/json",
          "Authorization": "Bearer <<(sourceData) => sourceData.credentials.apiKey>>"
        },
        "body": "{\"query\": \"<<(sourceData) => sourceData.query>>\"}",
        "pagination": {
          "type": "cursorBased",
          "pageSize": "50",
          "cursorPath": "meta.next_cursor",
          "stopCondition": "(response, pageInfo) => !response.data.pagination.has_more"
        },
        "systemId": "3f7c8d9e-1a2b-4c5d-8e9f-0a1b2c3d4e5f"
      },
      "instruction": "Fetch user details from the API",
      "modify": false,
      "dataSelector": "(sourceData) => sourceData.data.items",
      "failureBehavior": "fail"
    }
  ],
  "name": "Web Search",
  "version": "2.1.0",
  "instruction": "Search the web for the given query and return relevant results",
  "inputSchema": {
    "type": "object",
    "properties": {
      "query": {
        "type": "string"
      },
      "maxResults": {
        "type": "integer",
        "default": 10
      }
    },
    "required": [
      "query"
    ]
  },
  "outputSchema": {},
  "outputTransform": "(sourceData) => sourceData.map(item => ({ id: item.id, title: item.name }))",
  "folder": "integrations/payments",
  "archived": false,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

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.

Authorizations

Authorization
string
header
required

Static API key authentication using Bearer token scheme. Include your API key in the Authorization header: Authorization: Bearer YOUR_API_KEY

Alternatively, you can use the token query parameter to authenticate.

API keys can be generated in your superglue dashboard.

Body

application/json

Request body for creating a new tool

id
string

Optional custom ID. If not provided, a UUID is generated. A unique suffix may be appended to avoid conflicts.

Example:

"my-custom-tool"

name
string

Human-readable name for the tool

Example:

"Web Search"

steps
object[]

Ordered execution steps

instruction
string

Human-readable instruction describing what the tool does

Example:

"Search the web for the given query and return relevant results"

inputSchema
object

JSON Schema for tool inputs

outputSchema
object

JSON Schema for tool outputs

outputTransform
string

JavaScript function for final output transformation. Format: (sourceData) => expression

folder
string

Folder path for organizing tools

Example:

"integrations/payments"

Response

Tool created successfully

A multi-step workflow tool that executes one or more protocol-specific operations

id
string
required
Example:

"550e8400-e29b-41d4-a716-446655440000"

steps
object[]
required

Ordered execution steps that make up this tool

Minimum array length: 1
name
string
Example:

"Web Search"

version
string

Semantic version string (major.minor.patch)

Pattern: ^\d+\.\d+\.\d+$
Example:

"2.1.0"

instruction
string

Human-readable instruction describing what the tool does

Example:

"Search the web for the given query and return relevant results"

inputSchema
object

JSON Schema for tool inputs

Example:
{
  "type": "object",
  "properties": {
    "query": { "type": "string" },
    "maxResults": { "type": "integer", "default": 10 }
  },
  "required": ["query"]
}
outputSchema
object

JSON Schema for tool outputs (after transformations applied)

outputTransform
string

JavaScript function for final output transformation. Format: (sourceData) => expression

Example:

"(sourceData) => sourceData.map(item => ({ id: item.id, title: item.name }))"

folder
string

Folder path for organizing tools

Example:

"integrations/payments"

archived
boolean
default:false

Whether this tool is archived (if so, it will not be listed in the UI and cannot be run)

createdAt
string<date-time>
updatedAt
string<date-time>