POST
/
{resourceSlug}
/
forms
/
tool
/
{toolId}
/
edit
curl --request POST \
  --url https://app.agentcloud.dev/{resourceSlug}/forms/tool/{toolId}/edit \
  --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.

toolId
string
required

The ID of the tool to be edited.

Body

tool.json

JSON body containing the edited tool, all edited fields contain their new value and any unedited fields must still be included but with their original value.

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

Response

302
dynamicResponse

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

Server response after successsfully adding a new object