Commit 4434bab
committed
fix: support icons in registerTool config and tools/list response
The MCP spec's ToolSchema includes icons (via IconsSchema), but
McpServer.registerTool() did not accept icons in its config parameter,
and the tools/list handler did not include icons in the tool definition.
- Add icons to registerTool config type
- Pass icons through _createRegisteredTool
- Include icons in the tools/list response toolDefinition
- Add icons to RegisteredTool type
Fixes #18641 parent 1eb80c4 commit 4434bab
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
773 | 774 | | |
774 | 775 | | |
775 | 776 | | |
776 | | - | |
| 777 | + | |
| 778 | + | |
777 | 779 | | |
778 | 780 | | |
779 | 781 | | |
| |||
788 | 790 | | |
789 | 791 | | |
790 | 792 | | |
| 793 | + | |
791 | 794 | | |
792 | 795 | | |
793 | 796 | | |
| |||
870 | 873 | | |
871 | 874 | | |
872 | 875 | | |
| 876 | + | |
873 | 877 | | |
874 | 878 | | |
875 | 879 | | |
| |||
878 | 882 | | |
879 | 883 | | |
880 | 884 | | |
881 | | - | |
| 885 | + | |
882 | 886 | | |
883 | 887 | | |
884 | 888 | | |
| |||
889 | 893 | | |
890 | 894 | | |
891 | 895 | | |
892 | | - | |
| 896 | + | |
| 897 | + | |
893 | 898 | | |
894 | 899 | | |
895 | 900 | | |
| |||
1096 | 1101 | | |
1097 | 1102 | | |
1098 | 1103 | | |
| 1104 | + | |
1099 | 1105 | | |
1100 | 1106 | | |
1101 | 1107 | | |
| |||
0 commit comments