MCPcopy Create free account
hub / github.com/diillson/chatcli / buildMCPEmptyNote

Function buildMCPEmptyNote

cli/agent_mode.go:3199–3209  ·  view source on GitHub ↗

buildMCPEmptyNote returns the system-prompt note shown to the model when MCP is configured but no tool is usable yet — either still starting or every server failed to start. Returns empty string when no server is configured at all (so callers can append unconditionally).

(statuses []mcp.ServerStatus)

Source from the content-addressed store, hash-verified

3197// starting or every server failed to start. Returns empty string when
3198// no server is configured at all (so callers can append unconditionally).
3199func buildMCPEmptyNote(statuses []mcp.ServerStatus) string {
3200 if len(statuses) == 0 {
3201 return ""
3202 }
3203 for _, s := range statuses {
3204 if s.Starting {
3205 return i18n.T("agent.mcp.note_starting") + "\n"
3206 }
3207 }
3208 return i18n.T("agent.mcp.note_unavailable") + "\n"
3209}
3210
3211// mcpToolHasRequiredParams reports whether a JSON schema declares any
3212// required input parameter. Used to distinguish a tool that legitimately

Callers 2

TestBuildMCPEmptyNoteFunction · 0.85
getToolContextStringMethod · 0.85

Calls 1

TFunction · 0.92

Tested by 1

TestBuildMCPEmptyNoteFunction · 0.68