Tool Enable/Disable Management
manage_toolsList, enable, or disable FastMCP tools at runtime, globally or per session. Use service_filter to target all tools for a service like gmail or drive.
Instructions
List, enable, or disable FastMCP tools at runtime. Supports both global scope (affects all clients) and session scope (affects only current session). Use service_filter to target all tools for a service (e.g., 'gmail', 'chat', 'drive') without needing to know individual tool names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Scope of the operation: 'global' (default) - affects all MCP clients connected to this server, 'session' - affects only the current client session (other clients unaffected). Session scope requires SessionToolFilteringMiddleware to be enabled. | global |
| action | Yes | Action to perform: 'list' (show all tools), 'disable' (disable specific tools), 'enable' (enable specific tools), 'disable_all_except' (disable every tool except a kept list and protected infra tools), 'enable_all' (enable all tools in the registry). | |
| tool_names | No | Tool name(s) to enable/disable. Single string ('tool_a'), list (['tool_a', 'tool_b']), comma-separated ('tool_a,tool_b'), or JSON ('["tool_a","tool_b"]'). Required for enable/disable actions. | |
| service_filter | No | Filter tools by service name (e.g., 'gmail', 'chat', 'drive'). When provided, automatically resolves matching tool names from the registry using extract_service_from_tool(). Can be used instead of tool_names. | |
| include_internal | No | If True, include internal/system tools (names starting with '_') in listing | |
| user_google_email | No | Use 'me' or 'myself' for auto-resolution to authenticated user, or provide specific email address. If None, uses current authenticated user (auto-injected by middleware). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error message if the overall operation failed | |
| scope | No | Scope of the operation: 'global' affects all clients, 'session' affects only the current session | global |
| action | Yes | Action performed: 'list', 'enable', 'disable', 'disable_all_except', or 'enable_all' | |
| errors | No | List of error messages for individual tool operations that failed | |
| message | Yes | Human-readable summary of the operation | |
| success | Yes | Whether the tool management operation succeeded | |
| toolList | No | Full list of tools with their status (for 'list' action) | |
| totalTools | Yes | Total number of tools in the registry | |
| enabledCount | Yes | Number of currently enabled tools (global state) | |
| sessionState | No | Session-specific tool state (included when scope='session' or action='list') | |
| toolsSkipped | No | List of tool names that were skipped (protected or not found) | |
| disabledCount | Yes | Number of currently disabled tools (global state) | |
| toolsAffected | No | List of tool names that were enabled/disabled by this operation | |
| protectedTools | Yes | List of tool names that are protected from being disabled | |
| clientSupportsUI | No | Whether the connected client supports the MCP Apps UI extension | |
| enabledToolNames | No | List of tool names currently enabled for this session. Returned after modify actions (enable/disable) to allow clients to update their tool list without requiring a separate list_tools call or notification handling. |