Tool

Get tools

get
/v1/{organization}/tool/
Authorizations
Path parameters
organizationstringRequired
Query parameters
idstring[]Optional

The ID of the tool to retrieve.

Default: []
deprecatedany ofOptional

Whether the tools are deprecated.

booleanOptional
or
nullOptional
sort_bystring[]Optional

The fields to sort the versions by. Supported fields are name and deprecated. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
tagstring[]Optional

The tags of the simulation personas. Must be specified using the syntax key:value, which means to match all sets with the given key and value pair among its tags. If value is *, it means the value does not matter. If value is empty, it matches against when the value is None.

Default: []
limitinteger · min: 1 · max: 20Optional

The maximum number of tools to return.

Default: 10
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of tools.

Default: 0
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
200

Succeeded.

application/json
get
/v1/{organization}/tool/
GET /v1/{organization}/tool/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
  "tools": [
    {
      "id": "text",
      "org_id": "text",
      "created_at": "2025-10-21T15:10:59.432Z",
      "updated_at": "2025-10-21T15:10:59.432Z",
      "name": "text",
      "description": "text",
      "deprecated": true,
      "envvars": [
        "text"
      ],
      "secret_envvars": [
        "text"
      ],
      "tags": [
        {
          "key": "text",
          "value": "text"
        }
      ]
    }
  ],
  "has_more": true,
  "continuation_token": null,
  "filter_values": {
    "tags": [
      "text"
    ]
  }
}

Create a new tool

post
/v1/{organization}/tool/

Create a new tool. The tool will not contain any versions initially so is not usable until at least one version is published.

Permissions

This endpoint requires the following permissions:

  • Tool:CreateTool for the tool to create.

Authorizations
Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
namestring · min: 1Required

The name of the tool. It must be unique among all non-deprecated tools in the organization.

Pattern: ^[a-z0-9_]+$
descriptionstring · min: 1Required

A description of the tool.

Responses
201

Succeeded.

application/json
post
/v1/{organization}/tool/
POST /v1/{organization}/tool/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 78

{
  "name": "text",
  "description": "text",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "id": "text"
}

Deprecate tool versions

delete
/v1/{organization}/tool/{tool_id}/version/{versions}

Deprecate tool versions that match the specified semver constraint.

Permissions

This endpoint requires the following permissions:

  • Tool:ModifyTool on the tool whose versions to deprecate.

Authorizations
Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to deprecate.

Pattern: ^[a-f0-9]{24}$
versionsstringRequired

A semver constraint that specifies the version to deprecate in the Python packaging specification. All versions that match this constraint will be deprecated.

Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
204

Succeeded.

No content

delete
/v1/{organization}/tool/{tool_id}/version/{versions}
DELETE /v1/{organization}/tool/{tool_id}/version/{versions} HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*

No content

Modify a tool

post
/v1/{organization}/tool/{tool_id}

Modify basic properties of a tool, such as its description and tags.

Permissions

This endpoint requires the following permissions:

  • Tool:ModifyTool for the tool to modify.

Authorizations
Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to modify

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
descriptionany ofOptional

A description of this tool. Only updates if not-null.

string · min: 1Optional
or
nullOptional
tagsany ofOptional

The tags of this tool. Only updates if not-null.

or
nullOptional
Responses
204

Succeeded.

No content

post
/v1/{organization}/tool/{tool_id}
POST /v1/{organization}/tool/{tool_id} HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 64

{
  "description": "text",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

No content

Deprecate a tool

delete
/v1/{organization}/tool/{tool_id}

Deprecate the specified tool. All versions of the tool will be deprecated and the tool will no longer be used.

After the endpoint concludes, the deprecation will take around 1 minute to propagate across the system.

Permissions

This endpoint requires the following permissions:

  • Tool:DeleteTool on the tool to deprecate.

Authorizations
Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to deprecate.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
204

Succeeded.

No content

delete
/v1/{organization}/tool/{tool_id}
DELETE /v1/{organization}/tool/{tool_id} HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*

No content

Test a tool

post
/v1/{organization}/tool/test
Authorizations
Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
commit_branchstringRequired

The branch in the tools repo whose tip will be tested.

project_pathstringRequired

The directory in the tools repo that contains the pyproject.toml file corresponding to the tool version to publish.

Pattern: ^[-\w\d_/]+$
Responses
200

Succeeded

application/json
post
/v1/{organization}/tool/test
POST /v1/{organization}/tool/test HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 260

{
  "inputs": [
    {
      "input_parameters": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "invocation_mode": "regular"
    }
  ],
  "commit_branch": "text",
  "project_path": "text",
  "required_envvars": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "required_secret_envvars": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "invocation_results": [
    {
      "succeeded": true,
      "output": "text",
      "duration_ms": 1
    }
  ]
}

Modify the environment variables of a tool

post
/v1/{organization}/tool/{tool_id}/envvar

Add, update, or delete the environment variables of a tool. Environment variables must be present in the tool before any versions requiring them can be published.

You cannot delete variables that are required by non-deprecated tool versions.

Permissions

This endpoint requires the following permissions:

  • Tool:ModifyTool for the tool whose environment variables to modify.

Authorizations
Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to modify

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
Responses
204

Succeeded.

No content

post
/v1/{organization}/tool/{tool_id}/envvar
POST /v1/{organization}/tool/{tool_id}/envvar HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 132

{
  "inserts": [
    {
      "name": "text",
      "value": "text",
      "is_secret": true
    }
  ],
  "updates": [
    {
      "name": "text",
      "value": "text"
    }
  ],
  "deletes": [
    {
      "name": "text"
    }
  ]
}

No content

Get tool versions

get
/v1/{organization}/tool/{tool_id}/version
Authorizations
Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to retrieve versions for.

Pattern: ^[a-f0-9]{24}$
Query parameters
deprecatedany ofOptional

Whether the tools are deprecated.

booleanOptional
or
nullOptional
versionsany ofOptional

A semver constraint that specifies the version to retrieve in the Python packaging specification. If not specified, all versions will be retrieved.

stringOptional
or
nullOptional
sort_bystring[]Optional

The fields to sort the versions by. Supported fields are created_at, version.major, version.minor, version.patch, and deprecated. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
creatorstring[]Optional

The creators of the tool versions. Each value must be of the format org_id,user_id.

Default: []
limitinteger · max: 50Optional

The maximum number of tool versions to return.

Default: 50
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of tool versions.

Default: 0
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
200

Succeeded.

application/json
get
/v1/{organization}/tool/{tool_id}/version
GET /v1/{organization}/tool/{tool_id}/version HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
  "tool_versions": [
    {
      "id": "text",
      "org_id": "text",
      "created_at": "2025-10-21T15:10:59.432Z",
      "updated_at": "2025-10-21T15:10:59.432Z",
      "tool_id": "text",
      "version": {
        "major": 1,
        "minor": 1,
        "patch": 1
      },
      "required_envvars": [
        "text"
      ],
      "required_secret_envvars": [
        "text"
      ],
      "input_schema": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "tool_repo": "main",
      "tool_commit_hash": "text",
      "amigo_scaffold_commit_hash": "text",
      "project_directory": "text",
      "lambda_version": 1,
      "creator": {
        "user_id": "text",
        "user_org_id": "text"
      },
      "deprecated": true
    }
  ],
  "has_more": true,
  "continuation_token": null,
  "filter_values": {
    "creators": [
      {
        "user_id": "text",
        "user_org_id": "text"
      }
    ]
  }
}

Publish a new version of a tool

post
/v1/{organization}/tool/{tool_id}/version

Publish a new version of the specified tool. After this endpoint finishes, the new version will be immediately available for use.

This endpoint will take roughly 1-5 minutes to complete, so please adjust the timeout settings of your HTTP client accordingly.

Permissions

This endpoint requires the following permissions:

  • Tool:ModifyTool for the tool.

Authorizations
Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to publish

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
repostring · enumRequired

The repo to publish the tool version from. If team, then it's published from the repo of the organization's Azure DevOps team. If main, then it's published from the tools-main repo.

Possible values:
project_pathstringRequired

The directory in the tools repo that contains the pyproject.toml file corresponding to the tool version to publish.

Pattern: ^[-\w\d_/]+$
bump_typestring · enumRequired

The type of bump to apply to the version. For initial version of the tool, use major.

Possible values:
Responses
201

Succeeded.

application/json
post
/v1/{organization}/tool/{tool_id}/version
POST /v1/{organization}/tool/{tool_id}/version HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 57

{
  "repo": "main",
  "project_path": "text",
  "bump_type": "major"
}
{
  "new_version": "text"
}

Get tool invocations

get
/v1/{organization}/tool/invocation

Retrieve tool invocations under the specified filters.

Permissions

This endpoint may require the following permission:

  • Conversation:GetInteractionInsights for ToolInvocations from a regular conversation.

  • Simulation:GetSimulationUnitTestSetRun for ToolInvocations from a simulation conversation.

Authorizations
Path parameters
organizationstringRequired
Query parameters
tool_idstring[]Optional

The ID of the tool to get invocations for.

Default: []
versionstring[]Optional

A list of semver constraint that specifies the version to retrieve in the Python packaging specification. This must be the exact same length as tool_id, and each entry corresponds to the tool ID at the same index.

Default: []
conversation_idstring[]Optional

The conversation ID associated with the invocation if it's of invocation source regular-conversation

Default: []
simulation_unit_test_set_run_idstring[]Optional

The simulation unit test set run ID associated with the invocation if it's of invocation source simulation-conversation

Default: []
succeededany ofOptional

Whether the invocation succeeded

booleanOptional
or
nullOptional
limitinteger · max: 100Optional

The maximum number of tool invocations to return.

Default: 100
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of tool invocations.

Default: 0
sort_bystring[]Optional

The fields to sort the versions by. Supported fields are created_at, version.major, version.minor, version.patch, tool_id, invocation_source.type, and invocation_status.succeeded. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
200

Succeeded.

application/json
get
/v1/{organization}/tool/invocation
GET /v1/{organization}/tool/invocation HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
  "tool_invocations": [
    {
      "id": "text",
      "org_id": "text",
      "created_at": "2025-10-21T15:10:59.432Z",
      "updated_at": "2025-10-21T15:10:59.432Z",
      "invocation_status": {
        "succeeded": true,
        "output": "text"
      },
      "invocation_source": {
        "type": "regular-conversation",
        "user_id": "text",
        "conversation_id": "text",
        "interaction_id": "text",
        "invocation_metadata": {
          "type": "state-transition",
          "current_state_machine_and_version": [],
          "state_name": "text",
          "state_transition_index": 1,
          "tool_call_round_index": 1
        }
      },
      "logs": [
        "text"
      ],
      "duration_ms": 1,
      "tool_id": "text",
      "tool_version": {
        "major": 1,
        "minor": 1,
        "patch": 1
      }
    }
  ],
  "has_more": true,
  "continuation_token": null
}

Invoke a tool version

post
/v1/{organization}/tool/{tool_id}/version/{version}/invoke

Invoke a specified tool version with the given input parameters.

Permissions

This endpoint requires the following permissions:

  • Tool:InvokeTool for the tool to invoke.

Authorizations
Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to invoke

Pattern: ^[a-f0-9]{24}$
versionstringRequired

The version of the tool to invoke

Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
Responses
200

Succeeded

application/json
post
/v1/{organization}/tool/{tool_id}/version/{version}/invoke
POST /v1/{organization}/tool/{tool_id}/version/{version}/invoke HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 100

{
  "inputs": [
    {
      "input_parameters": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "invocation_mode": "regular"
    }
  ]
}
{
  "invocation_results": [
    {
      "succeeded": true,
      "output": "text",
      "duration_ms": 1
    }
  ]
}
get
/v1/{organization}/tool/invocation/search
Authorizations
Path parameters
organizationstringRequired
Query parameters
querystringRequired

The search query.

tool_idstring[]Optional

The ID of the tool to get invocations for.

Default: []
conversation_idstring[]Optional

The conversation ID associated with the invocation if it's of invocation source regular-conversation

Default: []
simulation_unit_test_set_run_idstring[]Optional

The simulation unit test set run ID associated with the invocation if it's of invocation source simulation-conversation

Default: []
succeededany ofOptional

Whether the invocation succeeded

booleanOptional
or
nullOptional
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
200

Succeeded.

application/json
get
/v1/{organization}/tool/invocation/search
GET /v1/{organization}/tool/invocation/search?query=text&query_against=invocation_status.exception_message HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
  "tool_invocations": [
    {
      "id": "text",
      "org_id": "text",
      "created_at": "2025-10-21T15:10:59.432Z",
      "updated_at": "2025-10-21T15:10:59.432Z",
      "invocation_status": {
        "succeeded": true,
        "output": "text"
      },
      "invocation_source": {
        "type": "regular-conversation",
        "user_id": "text",
        "conversation_id": "text",
        "interaction_id": "text",
        "invocation_metadata": {
          "type": "state-transition",
          "current_state_machine_and_version": [],
          "state_name": "text",
          "state_transition_index": 1,
          "tool_call_round_index": 1
        }
      },
      "logs": [
        "text"
      ],
      "duration_ms": 1,
      "tool_id": "text",
      "tool_version": {
        "major": 1,
        "minor": 1,
        "patch": 1
      }
    }
  ]
}

Last updated

Was this helpful?