Repository navigation
Commit 9a84462
committed
Evict cached x-mcp-header map when a re-list drops the tool
list_tools only overwrote the cache on the kept path, so if a tool was first
listed with valid x-mcp-header annotations and a later list returned the same
name with invalid ones, the tool was dropped but its stale arg->header map
survived -- a subsequent tools/call would still mirror the old Mcp-Param-*
headers. Evict the entry on the drop path so the cache reflects the last
list_tools entry. Found by Codex review.1 parent b8a88af commit 9a84462
2 files changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
789 | 792 | | |
790 | 793 | | |
791 | 794 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
507 | 539 | | |
508 | 540 | | |
509 | 541 | | |
| |||
0 commit comments