Commit 67184a2
committed
fix: add namespace prefix to MCP tools to prevent conflicts with plugin tools
- Add namespace prefix format: mcp_<server_name>__<tool_name> to MCPTool
- Store original tool name in MCPTool.original_tool_name for display and calling
- Add backward compatibility in get_func() to support old persona tool references
- Update tool list API to include display_name field showing original name
- Update MCP server info to display original tool names without prefix
- Fixes issue where MCP tools and plugin tools with same name would conflict1 parent 10ceacf commit 67184a2
3 files changed
Lines changed: 44 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
382 | 386 | | |
383 | | - | |
| 387 | + | |
384 | 388 | | |
385 | 389 | | |
386 | 390 | | |
387 | 391 | | |
388 | 392 | | |
389 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
390 | 397 | | |
391 | 398 | | |
392 | 399 | | |
393 | 400 | | |
| 401 | + | |
394 | 402 | | |
395 | | - | |
| 403 | + | |
396 | 404 | | |
397 | 405 | | |
398 | 406 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| 314 | + | |
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
318 | 339 | | |
319 | 340 | | |
320 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
| |||
434 | 440 | | |
435 | 441 | | |
436 | 442 | | |
| 443 | + | |
| 444 | + | |
437 | 445 | | |
438 | 446 | | |
439 | 447 | | |
440 | 448 | | |
441 | 449 | | |
442 | 450 | | |
| 451 | + | |
443 | 452 | | |
444 | 453 | | |
445 | 454 | | |
| 455 | + | |
446 | 456 | | |
447 | 457 | | |
448 | | - | |
| 458 | + | |
| 459 | + | |
449 | 460 | | |
450 | 461 | | |
451 | 462 | | |
| |||
0 commit comments