MCPcopy Create free account
hub / github.com/docker/model-test / handleViewCart

Method handleViewCart

services/tool_executor.go:192–201  ·  view source on GitHub ↗

handleViewCart handles view cart tool calls

(sessionID string, toolCallID string)

Source from the content-addressed store, hash-verified

190
191// handleViewCart handles view cart tool calls
192func (te *ToolExecutor) handleViewCart(sessionID string, toolCallID string) models.ToolCallResult {
193 cartSummary := te.cartService.GetCartSummary(sessionID)
194 return models.ToolCallResult{
195 CallID: toolCallID,
196 ToolName: "view_cart",
197 Success: true,
198 Result: cartSummary,
199 Arguments: "{}",
200 }
201}
202
203// handleCheckout handles checkout tool calls
204func (te *ToolExecutor) handleCheckout(sessionID string, toolCallID string) models.ToolCallResult {

Callers 1

executeToolCallMethod · 0.95

Calls 1

GetCartSummaryMethod · 0.80

Tested by

no test coverage detected