ToolboxesClient Class

  • java.lang.Object
    • com.azure.ai.agents.ToolboxesClient

public final class ToolboxesClient

Initializes a new instance of the synchronous AgentsClient type.

Method Summary

Modifier and Type Method and Description
ToolboxVersionDetails createToolboxVersion(String name, List<ToolboxTool> tools)

Create a new version of a toolbox Creates a new toolbox version, provisioning the toolbox itself if it does not already exist.

ToolboxVersionDetails createToolboxVersion(String name, List<ToolboxTool> tools, String description, Map<String,String> metadata, List<ToolboxSkill> skills, ToolboxPolicies policies)

Create a new version of a toolbox Creates a new toolbox version, provisioning the toolbox itself if it does not already exist.

Response<BinaryData> createToolboxVersionWithResponse(String name, BinaryData createToolboxVersionRequest, RequestOptions requestOptions)

Create a new version of a toolbox Creates a new toolbox version, provisioning the toolbox itself if it does not already exist.

void deleteToolbox(String name)

Delete a toolbox Removes the specified toolbox along with all of its versions.

void deleteToolboxVersion(String name, String version)

Delete a specific version of a toolbox Removes the specified version of a toolbox.

Response<Void> deleteToolboxVersionWithResponse(String name, String version, RequestOptions requestOptions)

Delete a specific version of a toolbox Removes the specified version of a toolbox.

Response<Void> deleteToolboxWithResponse(String name, RequestOptions requestOptions)

Delete a toolbox Removes the specified toolbox along with all of its versions.

ToolboxDetails getToolbox(String name)

Retrieve a toolbox Retrieves the specified toolbox and its current configuration.

ToolboxVersionDetails getToolboxVersion(String name, String version)

Retrieve a specific version of a toolbox Retrieves the specified version of a toolbox by name and version identifier.

Response<BinaryData> getToolboxVersionWithResponse(String name, String version, RequestOptions requestOptions)

Retrieve a specific version of a toolbox Retrieves the specified version of a toolbox by name and version identifier.

Response<BinaryData> getToolboxWithResponse(String name, RequestOptions requestOptions)

Retrieve a toolbox Retrieves the specified toolbox and its current configuration.

PagedIterable<ToolboxDetails> listToolboxes()

List toolboxes Returns the toolboxes available in the current project.

PagedIterable<ToolboxDetails> listToolboxes(Integer limit, PageOrder order, String after, String before)

List toolboxes Returns the toolboxes available in the current project.

PagedIterable<BinaryData> listToolboxes(RequestOptions requestOptions)

List toolboxes Returns the toolboxes available in the current project.

PagedIterable<ToolboxVersionDetails> listToolboxVersions(String name)

List toolbox versions Returns the available versions for the specified toolbox.

PagedIterable<ToolboxVersionDetails> listToolboxVersions(String name, Integer limit, PageOrder order, String after, String before)

List toolbox versions Returns the available versions for the specified toolbox.

PagedIterable<BinaryData> listToolboxVersions(String name, RequestOptions requestOptions)

List toolbox versions Returns the available versions for the specified toolbox.

ToolboxDetails updateToolbox(String name, String defaultVersion)

Update a toolbox to point to a specific version Updates the toolbox's default version pointer to the specified version.

Response<BinaryData> updateToolboxWithResponse(String name, BinaryData updateToolboxRequest, RequestOptions requestOptions)

Update a toolbox to point to a specific version Updates the toolbox's default version pointer to the specified version.

Methods inherited from java.lang.Object

Method Details

createToolboxVersion

public ToolboxVersionDetails createToolboxVersion(String name, List<ToolboxTool> tools)

Create a new version of a toolbox Creates a new toolbox version, provisioning the toolbox itself if it does not already exist.

Parameters:

name - The name of the toolbox. If the toolbox does not exist, it will be created.
tools - The list of tools to include in this version.

Returns:

a specific version of a toolbox.

createToolboxVersion

public ToolboxVersionDetails createToolboxVersion(String name, List<ToolboxTool> tools, String description, Map<String,String> metadata, List<ToolboxSkill> skills, ToolboxPolicies policies)

Create a new version of a toolbox Creates a new toolbox version, provisioning the toolbox itself if it does not already exist.

Parameters:

name - The name of the toolbox. If the toolbox does not exist, it will be created.
tools - The list of tools to include in this version.
description - A human-readable description of the toolbox.
metadata - Arbitrary key-value metadata to associate with the toolbox.
skills - The list of skill sources to include in this version. A skill reference specifies a skill name and optionally a version. If version is omitted, the skill's default version is used.
policies - Policy configuration for this toolbox version.

Returns:

a specific version of a toolbox.

createToolboxVersionWithResponse

public Response<BinaryData> createToolboxVersionWithResponse(String name, BinaryData createToolboxVersionRequest, RequestOptions requestOptions)

Create a new version of a toolbox Creates a new toolbox version, provisioning the toolbox itself if it does not already exist.

Request Body Schema

{
     description: String (Optional)
     metadata (Optional): {
         String: String (Required)
     }
     tools (Required): [
          (Required){
             type: String(code_interpreter/file_search/web_search/mcp/azure_ai_search/openapi/a2a_preview/browser_automation_preview/reminder_preview/work_iq_preview/fabric_iq_preview/toolbox_search_preview) (Required)
             name: String (Optional)
             description: String (Optional)
             tool_configs (Optional): {
                 String (Required): {
                     pin: Boolean (Optional)
                     additional_search_text: String (Optional)
                 }
             }
         }
     ]
     skills (Optional): [
          (Optional){
             type: String (Required)
         }
     ]
     policies (Optional): {
         rai_config (Optional): {
             rai_policy_name: String (Required)
         }
     }
 }

Response Body Schema

{
     metadata (Required): {
         String: String (Required)
     }
     id: String (Required)
     name: String (Required)
     version: String (Required)
     description: String (Optional)
     created_at: long (Required)
     tools (Required): [
          (Required){
             type: String(code_interpreter/file_search/web_search/mcp/azure_ai_search/openapi/a2a_preview/browser_automation_preview/reminder_preview/work_iq_preview/fabric_iq_preview/toolbox_search_preview) (Required)
             name: String (Optional)
             description: String (Optional)
             tool_configs (Optional): {
                 String (Required): {
                     pin: Boolean (Optional)
                     additional_search_text: String (Optional)
                 }
             }
         }
     ]
     skills (Optional): [
          (Optional){
             type: String (Required)
         }
     ]
     policies (Optional): {
         rai_config (Optional): {
             rai_policy_name: String (Required)
         }
     }
 }

Parameters:

name - The name of the toolbox. If the toolbox does not exist, it will be created.
createToolboxVersionRequest - The createToolboxVersionRequest parameter.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

a specific version of a toolbox along with Response<T>.

deleteToolbox

public void deleteToolbox(String name)

Delete a toolbox Removes the specified toolbox along with all of its versions.

Parameters:

name - The name of the toolbox to delete.

deleteToolboxVersion

public void deleteToolboxVersion(String name, String version)

Delete a specific version of a toolbox Removes the specified version of a toolbox.

Parameters:

name - The name of the toolbox.
version - The version identifier to delete.

deleteToolboxVersionWithResponse

public Response<Void> deleteToolboxVersionWithResponse(String name, String version, RequestOptions requestOptions)

Delete a specific version of a toolbox Removes the specified version of a toolbox.

Parameters:

name - The name of the toolbox.
version - The version identifier to delete.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

deleteToolboxWithResponse

public Response<Void> deleteToolboxWithResponse(String name, RequestOptions requestOptions)

Delete a toolbox Removes the specified toolbox along with all of its versions.

Parameters:

name - The name of the toolbox to delete.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

getToolbox

public ToolboxDetails getToolbox(String name)

Retrieve a toolbox Retrieves the specified toolbox and its current configuration.

Parameters:

name - The name of the toolbox to retrieve.

Returns:

a toolbox that stores reusable tool definitions for agents.

getToolboxVersion

public ToolboxVersionDetails getToolboxVersion(String name, String version)

Retrieve a specific version of a toolbox Retrieves the specified version of a toolbox by name and version identifier.

Parameters:

name - The name of the toolbox.
version - The version identifier to retrieve.

Returns:

a specific version of a toolbox.

getToolboxVersionWithResponse

public Response<BinaryData> getToolboxVersionWithResponse(String name, String version, RequestOptions requestOptions)

Retrieve a specific version of a toolbox Retrieves the specified version of a toolbox by name and version identifier.

Response Body Schema

{
     metadata (Required): {
         String: String (Required)
     }
     id: String (Required)
     name: String (Required)
     version: String (Required)
     description: String (Optional)
     created_at: long (Required)
     tools (Required): [
          (Required){
             type: String(code_interpreter/file_search/web_search/mcp/azure_ai_search/openapi/a2a_preview/browser_automation_preview/reminder_preview/work_iq_preview/fabric_iq_preview/toolbox_search_preview) (Required)
             name: String (Optional)
             description: String (Optional)
             tool_configs (Optional): {
                 String (Required): {
                     pin: Boolean (Optional)
                     additional_search_text: String (Optional)
                 }
             }
         }
     ]
     skills (Optional): [
          (Optional){
             type: String (Required)
         }
     ]
     policies (Optional): {
         rai_config (Optional): {
             rai_policy_name: String (Required)
         }
     }
 }

Parameters:

name - The name of the toolbox.
version - The version identifier to retrieve.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

a specific version of a toolbox along with Response<T>.

getToolboxWithResponse

public Response<BinaryData> getToolboxWithResponse(String name, RequestOptions requestOptions)

Retrieve a toolbox Retrieves the specified toolbox and its current configuration.

Response Body Schema

{
     id: String (Required)
     name: String (Required)
     default_version: String (Required)
 }

Parameters:

name - The name of the toolbox to retrieve.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

a toolbox that stores reusable tool definitions for agents along with Response<T>.

listToolboxes

public PagedIterable<ToolboxDetails> listToolboxes()

List toolboxes Returns the toolboxes available in the current project.

Returns:

the response data for a requested list of items as paginated response with PagedIterable<T>.

listToolboxes

public PagedIterable<ToolboxDetails> listToolboxes(Integer limit, PageOrder order, String after, String before)

List toolboxes Returns the toolboxes available in the current project.

Parameters:

limit - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
order - Sort order by the created_at timestamp of the objects. asc for ascending order anddesc for descending order.
after - A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
before - A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

Returns:

the response data for a requested list of items as paginated response with PagedIterable<T>.

listToolboxes

public PagedIterable<BinaryData> listToolboxes(RequestOptions requestOptions)

List toolboxes Returns the toolboxes available in the current project.

Query Parameters

| ------ | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name   | Type    | Required | Description                                                                                                                                                                                                                                                                               |
| limit  | Integer | No       | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.                                                                                                                                                                                |
| order  | String  | No       | Sort order by the \`created\_at\` timestamp of the objects. \`asc\` for ascending order and\`desc\` for descending order. Allowed values: "asc", "desc".                                                                                                                                  |
| after  | String  | No       | A cursor for use in pagination. \`after\` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj\_foo, your subsequent call can include after=obj\_foo in order to fetch the next page of the list.       |
| before | String  | No       | A cursor for use in pagination. \`before\` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj\_foo, your subsequent call can include before=obj\_foo in order to fetch the previous page of the list. |

You can add these to a request with RequestOptions#addQueryParam

Response Body Schema

{
     id: String (Required)
     name: String (Required)
     default_version: String (Required)
 }

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the response data for a requested list of items as paginated response with PagedIterable<T>.

listToolboxVersions

public PagedIterable<ToolboxVersionDetails> listToolboxVersions(String name)

List toolbox versions Returns the available versions for the specified toolbox.

Parameters:

name - The name of the toolbox to list versions for.

Returns:

the response data for a requested list of items as paginated response with PagedIterable<T>.

listToolboxVersions

public PagedIterable<ToolboxVersionDetails> listToolboxVersions(String name, Integer limit, PageOrder order, String after, String before)

List toolbox versions Returns the available versions for the specified toolbox.

Parameters:

name - The name of the toolbox to list versions for.
limit - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
order - Sort order by the created_at timestamp of the objects. asc for ascending order anddesc for descending order.
after - A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
before - A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

Returns:

the response data for a requested list of items as paginated response with PagedIterable<T>.

listToolboxVersions

public PagedIterable<BinaryData> listToolboxVersions(String name, RequestOptions requestOptions)

List toolbox versions Returns the available versions for the specified toolbox.

Query Parameters

| ------ | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name   | Type    | Required | Description                                                                                                                                                                                                                                                                               |
| limit  | Integer | No       | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.                                                                                                                                                                                |
| order  | String  | No       | Sort order by the \`created\_at\` timestamp of the objects. \`asc\` for ascending order and\`desc\` for descending order. Allowed values: "asc", "desc".                                                                                                                                  |
| after  | String  | No       | A cursor for use in pagination. \`after\` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj\_foo, your subsequent call can include after=obj\_foo in order to fetch the next page of the list.       |
| before | String  | No       | A cursor for use in pagination. \`before\` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj\_foo, your subsequent call can include before=obj\_foo in order to fetch the previous page of the list. |

You can add these to a request with RequestOptions#addQueryParam

Response Body Schema

{
     metadata (Required): {
         String: String (Required)
     }
     id: String (Required)
     name: String (Required)
     version: String (Required)
     description: String (Optional)
     created_at: long (Required)
     tools (Required): [
          (Required){
             type: String(code_interpreter/file_search/web_search/mcp/azure_ai_search/openapi/a2a_preview/browser_automation_preview/reminder_preview/work_iq_preview/fabric_iq_preview/toolbox_search_preview) (Required)
             name: String (Optional)
             description: String (Optional)
             tool_configs (Optional): {
                 String (Required): {
                     pin: Boolean (Optional)
                     additional_search_text: String (Optional)
                 }
             }
         }
     ]
     skills (Optional): [
          (Optional){
             type: String (Required)
         }
     ]
     policies (Optional): {
         rai_config (Optional): {
             rai_policy_name: String (Required)
         }
     }
 }

Parameters:

name - The name of the toolbox to list versions for.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the response data for a requested list of items as paginated response with PagedIterable<T>.

updateToolbox

public ToolboxDetails updateToolbox(String name, String defaultVersion)

Update a toolbox to point to a specific version Updates the toolbox's default version pointer to the specified version.

Parameters:

name - The name of the toolbox to update.
defaultVersion - The version identifier that the toolbox should point to. When set, the toolbox's default version will resolve to this version instead of the latest.

Returns:

a toolbox that stores reusable tool definitions for agents.

updateToolboxWithResponse

public Response<BinaryData> updateToolboxWithResponse(String name, BinaryData updateToolboxRequest, RequestOptions requestOptions)

Update a toolbox to point to a specific version Updates the toolbox's default version pointer to the specified version.

Request Body Schema

{
     default_version: String (Required)
 }

Response Body Schema

{
     id: String (Required)
     name: String (Required)
     default_version: String (Required)
 }

Parameters:

name - The name of the toolbox to update.
updateToolboxRequest - The updateToolboxRequest parameter.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

a toolbox that stores reusable tool definitions for agents along with Response<T>.

Applies to