Files
wehub-resource-sync e04ed9c211
CF: Deploy Dev Docs / deploy (push) Has been cancelled
Sync Labels / build (push) Has been cancelled
tests / unit tests (macos-latest) (push) Has been cancelled
tests / unit tests (windows-latest) (push) Has been cancelled
tests / unit tests (ubuntu-latest) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:32:45 +08:00

2.2 KiB

title, type, weight, description
title type weight description
Toolsets docs 5 Toolsets allow you to define logical groups of tools to load together for specific agents or applications.

A Toolset allows you to logically group multiple tools together so they can be loaded and managed as a single unit. You can define Toolsets as documents in your tools.yaml file.

This is especially useful when you are building a system with multiple AI agents or applications, where each agent only needs access to a specific subset of tools to perform its specialized tasks safely and efficiently.

{{< notice tip >}} Try organizing your toolsets by the agent's persona or app feature (e.g., data_analyst_set vs customer_support_set). This keeps your client-side code clean and ensures an agent isn't distracted by tools it doesn't need. {{< /notice >}}

Defining Toolsets

In your configuration file, define each toolset by providing a unique name and a list of tools that belong to that group..

kind: toolset
name: my_first_toolset
tools:
  - my_first_tool
  - my_second_tool
---
kind: toolset
name: my_second_toolset
tools:
  - my_second_tool
  - my_third_tool

Using toolsets with MCP Toolbox Client SDKs

Once your toolsets are defined in your configuration, you can retrieve them directly from your application code. If you request a toolset without specifying a name, the SDKs will default to loading every tool available on the server.

Here is how to load your toolsets across our supported languages:

Python

# Load all tools available on the server
all_tools = client.load_toolset()

# Load only the tools defined in 'my_second_toolset'
my_second_toolset = client.load_toolset("my_second_toolset")

Javascript/Typescript

// Load all tools available on the server
const allTools = await client.loadToolset()

// Load only the tools defined in 'my_second_toolset'
const mySecondToolset = await client.loadToolset("my_second_toolset")

Go

// Load all tools available on the server
allTools, err := client.LoadToolset("", ctx)

// Load only the tools defined in 'my_second_toolset'
mySecondToolset, err := client.LoadToolset("my-toolset", ctx)