forked from kent/consciousness
Agent:🆕 stop unconditionally adding all MCP tools
Each agent is passed its own tool list — that's the list it should advertise. The line that appended all_mcp_tool_definitions() was causing unconscious agents to see bash/read_file/etc in their prompt even though they couldn't execute them. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
f408bb5d86
commit
090c8e4d35
1 changed files with 1 additions and 2 deletions
|
|
@ -198,8 +198,7 @@ impl Agent {
|
||||||
context.conversation_log = conversation_log;
|
context.conversation_log = conversation_log;
|
||||||
context.push_no_log(Section::System, AstNode::system_msg(&system_prompt));
|
context.push_no_log(Section::System, AstNode::system_msg(&system_prompt));
|
||||||
|
|
||||||
let mut tool_defs: Vec<String> = agent_tools.iter().map(|t| t.to_json()).collect();
|
let tool_defs: Vec<String> = agent_tools.iter().map(|t| t.to_json()).collect();
|
||||||
tool_defs.extend(tools::all_mcp_tool_definitions().await);
|
|
||||||
|
|
||||||
if !tool_defs.is_empty() {
|
if !tool_defs.is_empty() {
|
||||||
let tools_text = format!(
|
let tools_text = format!(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue