跳到主要内容

Tools resolution

The DocSpace MCP server resolves which tools are available based on toolset configuration and enabled/disabled tool options.

Visualization

The tools resolution process follows a sequence that starts with toolsets, adds explicitly enabled tools, and removes explicitly disabled tools. The flowcharts below illustrate this process for both global and request-level configuration.

Global Configuration

During server initialization, the global configuration determines the baseline set of available tools.

Request Configuration

For HTTP-like transports, request-specific headers can override the global tool configuration using the same resolution process. However, the available toolsets and tools are constrained by what was configured globally.

Examples

For simplicity, let us come up with a small list of available toolsets and tools. The real DocSpace MCP server provides more of them, but for these examples, just a few are enough:

ToolsetTools
filescreate_file, get_file, delete_file
folderscreate_folder, get_folder, delete_folder

Enable a Tool From Not Specified Toolset

Configuration:

KeyValue
Toolsetsfiles
Enabled Toolscreate_folder

Result:

ToolsetTools
filescreate_file, get_file, delete_file
folderscreate_folder

Disable a Tool From Specified Toolset

Configuration:

KeyValue
Toolsetsfiles
Enabled Toolscreate_folder
Disabled Toolsget_file

Result:

ToolsetTools
filescreate_file, delete_file
folderscreate_folder

Manually Specify Tools to Be Available

Configuration:

KeyValue
Toolsets(empty, to disable all tools)
Enabled Toolscreate_file, get_file, create_folder
Disabled Toolsget_file, delete_folder

Result:

ToolsetTools
filescreate_file
folderscreate_folder

References