Commit c8bdf76
fix: Add array schema validation fix to HTTP-Streaming MCP client
- Add _fix_array_schemas method to HTTPStreamingMCPTool class
- Apply schema fix in to_openai_tool method to ensure array types have 'items' property
- Remove unused imports (Callable, BaseSession, RequestContext, Tool)
This fixes OpenAI function calling validation errors for MCP tools with array parameters.
Co-authored-by: Mervin Praison <MervinPraison@users.noreply.github.com>1 parent 3570545 commit c8bdf76
File tree
1 file changed
+42
-5
lines changed- src/praisonai-agents/praisonaiagents/mcp
1 file changed
+42
-5
lines changedLines changed: 42 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
| |||
259 | 256 | | |
260 | 257 | | |
261 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
262 | 296 | | |
263 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
264 | 301 | | |
265 | 302 | | |
266 | 303 | | |
267 | 304 | | |
268 | 305 | | |
269 | | - | |
| 306 | + | |
270 | 307 | | |
271 | 308 | | |
272 | 309 | | |
| |||
0 commit comments