apply_tool_filters
Method
This is a method of the MCP class in the mcp module.Public API to (re)apply allow/deny tool filters to this instance. Lets callers (e.g. the loader) express include/exclude intent without reaching into private state.
allowed_tools wins over
disabled_tools when both are supplied.
Signature
Parameters
Optional
Only these tool names are kept (allowlist).
Optional
These tool names are removed (denylist).
Returns
'MCP'
self, to allow fluent chaining.
Source
View on GitHub
praisonaiagents/mcp/mcp.py at line 740
