跳到主要内容

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 unspecified 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​