Tools

Update a tool

put/tools/{toolId}

Request

  • Base URL
    https://api.superglue.cloud/v1
  • Auth
    HTTP bearer

Path parameters

toolIdstring required

Request body

namestring

Human-readable name for the tool

instructionstring

Human-readable instruction describing what the tool does

inputSchemaobject

JSON Schema for tool inputs

outputSchemaobject

JSON Schema for tool outputs

outputTransformstring

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

folderstring

Folder path for organizing tools

archivedboolean

Set to true to archive the tool (prevents execution and hides from default listing)

Example request

{
  "name": "Web Search v2",
  "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, sourceData) => !response.data.pagination.has_more || pageInfo.totalFetched >= sourceData.maxResults"
        },
        "systemId": "3f7c8d9e-1a2b-4c5d-8e9f-0a1b2c3d4e5f"
      },
      "instruction": "Fetch user details from the API",
      "dataSelector": "(sourceData) => sourceData.data.items"
    }
  ]
}

Response

Tool updated successfully

idstring required
namestring
versionstring

Semantic version string (major.minor.patch)

instructionstring

Human-readable instruction describing what the tool does

inputSchemaobject

JSON Schema for tool inputs

outputSchemaobject

JSON Schema for tool outputs (after transformations applied)

outputTransformstring

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

folderstring

Folder path for organizing tools

archivedboolean

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

createdByUserIdstring

ID of the user who created the tool.

createdAtstring date-time
updatedAtstring date-time
lastUsedAtstring date-time

Example response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "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"
    ]
  },
  "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, sourceData) => !response.data.pagination.has_more || pageInfo.totalFetched >= sourceData.maxResults"
        },
        "systemId": "3f7c8d9e-1a2b-4c5d-8e9f-0a1b2c3d4e5f"
      },
      "instruction": "Fetch user details from the API",
      "dataSelector": "(sourceData) => sourceData.data.items"
    }
  ],
  "outputTransform": "(sourceData) => sourceData.map(item => ({ id: item.id, title: item.name }))",
  "folder": "integrations/payments"
}

Changes

No recorded changes to this operation across all 1 revision of this API.