MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / parseToolCall

Function parseToolCall

out/cli.cjs:81759–81768  ·  view source on GitHub ↗
(params, toolCall)

Source from the content-addressed store, hash-verified

81757 if ("$parseRaw" in params.response_format) {
81758 const response_format = params.response_format;
81759 return response_format.$parseRaw(content);
81760 }
81761 return JSON.parse(content);
81762 }
81763 return null;
81764}
81765function parseToolCall(params, toolCall) {
81766 const inputTool = params.tools?.find((inputTool2) => inputTool2.function?.name === toolCall.function.name);
81767 return {
81768 ...toolCall,
81769 function: {
81770 ...toolCall.function,
81771 parsed_arguments: isAutoParsableTool(inputTool) ? inputTool.$parseRaw(toolCall.function.arguments) : inputTool?.function.strict ? JSON.parse(toolCall.function.arguments) : null

Callers 1

parseChatCompletionFunction · 0.85

Calls 2

isAutoParsableToolFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…