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

Function buildChatExceptionTools

cli/chat_ask.go:180–195  ·  view source on GitHub ↗

buildChatExceptionTools assembles the native tool definitions for the enabled chat exceptions, in a stable order.

(askOn, kbOn, gvOn, memOn bool)

Source from the content-addressed store, hash-verified

178// buildChatExceptionTools assembles the native tool definitions for the
179// enabled chat exceptions, in a stable order.
180func buildChatExceptionTools(askOn, kbOn, gvOn, memOn bool) []models.ToolDefinition {
181 var tools []models.ToolDefinition
182 if askOn {
183 tools = append(tools, workers.AskUserToolDefinition())
184 }
185 if kbOn {
186 tools = append(tools, knowledgeToolDefinition())
187 }
188 if gvOn {
189 tools = append(tools, graphViewToolDefinition())
190 }
191 if memOn {
192 tools = append(tools, memoryToolDefinition())
193 }
194 return tools
195}
196
197// chatExceptionCalls carries the FIRST call captured per exception tool in one
198// decision round; collect ignores disabled tools and later duplicates.

Callers 1

executeChatAskNativeMethod · 0.85

Calls 4

AskUserToolDefinitionFunction · 0.92
knowledgeToolDefinitionFunction · 0.85
graphViewToolDefinitionFunction · 0.85
memoryToolDefinitionFunction · 0.85

Tested by

no test coverage detected