feat: filter tools by MCP Apps visibility metadata (#8022)
Signed-off-by: Andrew Harvard <aharvard@squareup.com> Co-authored-by: Goose <opensource@block.xyz>
This commit is contained in:
@@ -231,7 +231,12 @@ async fn build_subagent_prompt(
|
||||
session_id: &str,
|
||||
system_instructions: String,
|
||||
) -> Result<String> {
|
||||
let tools = agent.list_tools(session_id, None).await;
|
||||
let tools: Vec<_> = agent
|
||||
.list_tools(session_id, None)
|
||||
.await
|
||||
.into_iter()
|
||||
.filter(super::reply_parts::is_tool_visible_to_model)
|
||||
.collect();
|
||||
render_template(
|
||||
"subagent_system.md",
|
||||
&SubagentPromptContext {
|
||||
|
||||
Reference in New Issue
Block a user