POST
/
{resourceSlug}
/
forms
/
tool
/
add
curl --request POST \
  --url https://app.agentcloud.dev/{resourceSlug}/forms/tool/add \
  --header 'Content-Type: tool.json' \
  --data '{
  "_id": "<string>",
  "orgId": "<string>",
  "teamId": "<string>",
  "name": "<string>",
  "description": "<string>",
  "type": "function",
  "asdf": "<string>",
  "retriever_type": "raw",
  "retriever_config": {
    "k": 123,
    "metadata_field_info": [
      {
        "name": "<string>",
        "description": "<string>",
        "type": "string"
      }
    ]
  },
  "datasourceId": "<string>",
  "state": "pending",
  "data": {
    "runtime": "<string>",
    "builtin": true,
    "name": "<string>",
    "description": "<string>",
    "apiKey": "<string>",
    "environmentVariables": {},
    "parameters": {
      "properties": {},
      "required": [
        "<string>"
      ]
    },
    "code": "<string>",
    "requirements": "<string>",
    "openAPIMatchKey": "<string>"
  },
  "icon": {
    "id": {},
    "filename": "<string>"
  },
  "hidden": true,
  "functionId": "<string>",
  "revisionId": "<string>",
  "functionLogs": "<string>"
}'
{
  "_id": "<string>",
  "redirect": "<string>"
}

Path Parameters

resourceSlug
string
required

The resourceSlug is a URL parameter of the teamId associated with the user. Anywhere the resourceSlug is used can be interpreted as a teamId.

Body

tool.json

JSON body containing the tool object with at least the required fields. Do not include an '_id', as this will be automatically generated.

Represents a tool within the system, including its configuration, state, and associated retrievers.

Response

302
dynamicResponse

Successful operation, redirect to '/{resourceSlug}/tools'.

Server response after successsfully adding a new object