Commit 717566e
Containerized Agent
fix: support MCP tools in programmatic_tool_caller
Use agent.tool.<name>() instead of directly calling tool_impl() from registry.
This properly handles all tool types including MCP tools which are not directly
callable but work through the ToolExecutor._stream() mechanism.
- Changed _execute_tool to use getattr(agent.tool, tool_name)()
- Added record_direct_tool_call=False to prevent polluting message history
- Handle AttributeError for tool not found case1 parent 4c0857b commit 717566e
1 file changed
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | 151 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
157 | 156 | | |
158 | 157 | | |
159 | 158 | | |
| |||
170 | 169 | | |
171 | 170 | | |
172 | 171 | | |
| 172 | + | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| |||
0 commit comments