update mcp toolset and sample agent based on new tool_filter definition

PiperOrigin-RevId: 757969950
This commit is contained in:
Xiang (Sean) Zhou
2025-05-12 17:04:55 -07:00
committed by Copybara-Service
parent 722028801a
commit d35b99e6dd
3 changed files with 21 additions and 4 deletions

View File

@@ -34,8 +34,12 @@ root_agent = LlmAgent(
],
),
# don't want agent to do write operation
tool_predicate=lambda tool, ctx=None: tool.name
not in ('write_file', 'edit_file', 'create_directory', 'move_file'),
tool_filter=[
'write_file',
'edit_file',
'create_directory',
'move_file',
],
)
],
)