v5.8.0 - Function-Based Auto-Approval #177
Pinned
ravitemer
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What's New
Function-Based Auto-Approval
You can now provide a custom function to
auto_approve
that makes intelligent decisions based on tool arguments.Parameters available in the function:
params.server_name
- Name of the MCP serverparams.tool_name
- Name of the tool being called (nil for resources)params.arguments
- Table of arguments passed to the toolparams.action
- Either "use_mcp_tool" or "access_mcp_resource"params.uri
- Resource URI (for resource access)params.is_auto_approved_in_server
- Boolean indicating if tool is configured for auto-approval in servers.jsonReturn values:
true
- Auto-approve the callfalse
- Show confirmation promptstring
- Deny with error messagenil
- Show confirmation prompt (same as false)Auto-Approval Priority
The system checks auto-approval in this order:
Function: Custom
auto_approve
function (if provided)Server-specific:
autoApprove
field in server config (Pressa
against a tool or server)Key Benefits
server_name
,tool_name
,arguments
,uri
, etc.Beta Was this translation helpful? Give feedback.
All reactions