Skip to main content
POST
/
v2
/
tools
/
{tool_id}
/
duplicate
Duplicate tool
curl --request POST \
  --url https://api.orq.ai/v2/tools/{tool_id}/duplicate \
  --header 'Authorization: Bearer <token>'
{
  "id": "tool_01ABC123DEF456789",
  "key": "my_duplicated_tool",
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "domain_id": "123e4567-e89b-12d3-a456-426614174001",
  "display_name": "My Tool (copy)",
  "description": "A useful tool for getting weather information",
  "type": "function",
  "function": {
    "name": "get_weather",
    "description": "Get the current weather for a location",
    "parameters": {
      "type": "object",
      "properties": {
        "location": {
          "type": "string",
          "description": "Location name"
        }
      },
      "required": [
        "location"
      ]
    }
  },
  "path": "Default",
  "status": "active",
  "created": "2024-01-15T10:30:00.000Z",
  "updated": "2024-01-15T10:30:00.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tool_id
string
required

The id of the tool to duplicate

Response

Successfully duplicated the tool.

  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
path
string
required

Entity storage path in the format: project/folder/subfolder/...

The first element identifies the project, followed by nested folders (auto-created as needed).

With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.

Example:

"Default"

key
string
required

Unique key of the tool as it will be displayed in the UI

Required string length: 1 - 128
description
string
required

A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the description field as accurate as possible to give enough context to the model to make the right decision.

project_id
string
required
workspace_id
string
required
created
string
required
updated
string
required
type
enum<string>
required
Available options:
function
function
object
required
_id
string<ulid>
default:01K8VCCV9TECNZZF8V9WW1AEWV
display_name
string

The name of the tool as it will be displayed in the UI. This is optional and if not provided, the key will be used.

created_by_id
string

The id of the user that created the tool

updated_by_id
string

The id of the user that last updated the tool

status
enum<string>
default:live

The status of the tool. Live is the latest version of the tool. Draft is a version that is not yet published. Pending is a version that is pending approval. Published is a version that was live and has been replaced by a new version.

Available options:
live,
draft,
pending,
published
version_hash
string