ToolSet Class 
A collection of tools that can be used by an synchronize agent.
Constructor
ToolSet()Methods
| add | Add a tool to the tool set. | 
| execute_tool_calls | Execute a tool of the specified type with the provided tool calls. | 
| get_definitions_and_resources | Get the definitions and resources for all tools in the tool set. | 
| get_tool | Get a tool of the specified type from the tool set. For McpTool, if 'server_label' is provided, returns the MCP tool with that specific server label. If there are multiple MCP tools and no server_label is provided, raises an error. Otherwise, returns the first (or only) tool of the specified type. | 
| remove | Remove a tool of the specified type from the tool set. For OpenApiTool, if 'name' is provided, removes a specific API definition by name. For McpTool, if 'server_label' is provided, removes a specific MCP tool by server label. For McpTool without server_label, removes ALL MCP tools from the toolset. Otherwise, removes the entire tool from the toolset. | 
| validate_tool_type | Validate the type of the tool. | 
add
Add a tool to the tool set.
add(tool: Tool)Parameters
| Name | Description | 
|---|---|
| tool 
				Required
			 | The tool to add. | 
Exceptions
| Type | Description | 
|---|---|
| If a tool of the same type already exists, or if an MCP tool with the same server label already exists. | 
execute_tool_calls
get_definitions_and_resources
get_tool
Get a tool of the specified type from the tool set. For McpTool, if 'server_label' is provided, returns the MCP tool with that specific server label. If there are multiple MCP tools and no server_label is provided, raises an error. Otherwise, returns the first (or only) tool of the specified type.
get_tool(tool_type: Type[ToolT], *, server_label: str | None = None) -> ToolTParameters
| Name | Description | 
|---|---|
| tool_type 
				Required
			 | The type of tool to get. | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| server_label | The server label of the specific MCP tool to get. Default value: None | 
Returns
| Type | Description | 
|---|---|
| The tool of the specified type. | 
Exceptions
| Type | Description | 
|---|---|
| If a tool of the specified type is not found, if no McpTool with the specified server_label is found, or if there are multiple MCP tools but no server_label is provided. | 
remove
Remove a tool of the specified type from the tool set. For OpenApiTool, if 'name' is provided, removes a specific API definition by name. For McpTool, if 'server_label' is provided, removes a specific MCP tool by server label. For McpTool without server_label, removes ALL MCP tools from the toolset. Otherwise, removes the entire tool from the toolset.
remove(tool_type: Type[Tool], *, name: str | None = None, server_label: str | None = None) -> NoneParameters
| Name | Description | 
|---|---|
| tool_type 
				Required
			 | The type of tool to remove. | 
Keyword-Only Parameters
| Name | Description | 
|---|---|
| name | The name of the OpenAPI definition to remove from the tool. Default value: None | 
| server_label | The unique server label identifying the MCP tool to remove. Default value: None | 
Returns
| Type | Description | 
|---|---|
| None | 
Exceptions
| Type | Description | 
|---|---|
| If a tool of the specified type is not found. | 
validate_tool_type
Validate the type of the tool.
validate_tool_type(tool: Tool) -> NoneParameters
| Name | Description | 
|---|---|
| tool 
				Required
			 | The type of the tool to validate. | 
Exceptions
| Type | Description | 
|---|---|
| If the tool type is not a subclass of Tool. |