nameFor picks a stable, user-visible name for a toolset. We look for any inner toolset that implements tools.Named (walked via tools.As so wrappers like StartableToolSet are transparent). The registry adds a WithName wrapper for every built-in toolset so this is reachable for almost every toolset; f
(ts tools.ToolSet, fallback string)
| 1096 | // almost every toolset; fallback uses the description ("mcp(stdio cmd=...)"), |
| 1097 | // which is still better than the Go type name. |
| 1098 | func nameFor(ts tools.ToolSet, fallback string) string { |
| 1099 | if name := tools.GetName(ts); name != "" { |
| 1100 | return name |
| 1101 | } |
| 1102 | return fallback |
| 1103 | } |
| 1104 | |
| 1105 | // CurrentMCPPrompts returns the available MCP prompts from all active MCP toolsets |
| 1106 | // for the current agent. It discovers prompts by calling ListPrompts on each MCP toolset |