mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 04:54:17 +02:00
Support plural names/keys in enable/disable API
Change enable() and disable() to accept sets: names, keys, tags. Use key-based disable for decorator enabled=False to scope exactly.
This commit is contained in:
parent
50ba6ea5a4
commit
84d7d3b281
21 changed files with 167 additions and 136 deletions
|
|
@ -38,7 +38,7 @@ from fastmcp.server.transforms import Enabled
|
|||
Enabled(False, tags=frozenset({"internal"}))
|
||||
|
||||
# Re-enable specific tool (override earlier disable)
|
||||
Enabled(True, name="safe_tool")
|
||||
Enabled(True, names={"safe_tool"})
|
||||
|
||||
# Allowlist via composition:
|
||||
Enabled(False, match_all=True) # disable everything
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue