MCPcopy Index your code
hub / github.com/coder/coder / activeToolNamesForTurn

Function activeToolNamesForTurn

coderd/x/chatd/chatd.go:6592–6605  ·  view source on GitHub ↗

activeToolNamesForTurn extends the built-in plan allowlist with approved external MCP tools for root plan-mode chats.

(
	allTools []fantasy.AgentTool,
	mode database.NullChatPlanMode,
	parentChatID uuid.NullUUID,
	approvedMCPConfigIDs map[uuid.UUID]struct{},
)

Source from the content-addressed store, hash-verified

6590// activeToolNamesForTurn extends the built-in plan allowlist with approved
6591// external MCP tools for root plan-mode chats.
6592func activeToolNamesForTurn(
6593 allTools []fantasy.AgentTool,
6594 mode database.NullChatPlanMode,
6595 parentChatID uuid.NullUUID,
6596 approvedMCPConfigIDs map[uuid.UUID]struct{},
6597) []string {
6598 toolNames := make([]string, 0, len(allTools))
6599 for _, tool := range allTools {
6600 if toolAllowedForTurn(tool, mode, parentChatID, approvedMCPConfigIDs) {
6601 toolNames = append(toolNames, tool.Info().Name)
6602 }
6603 }
6604 return toolNames
6605}
6606
6607func allowedExploreToolNames(allTools []fantasy.AgentTool) []string {
6608 builtinExplorePolicy := map[string]bool{

Callers 2

runChatMethod · 0.85

Calls 2

toolAllowedForTurnFunction · 0.85
InfoMethod · 0.45

Tested by 1