MCPcopy Create free account
hub / github.com/anomalyco/opencode / parseToolInput

Function parseToolInput

packages/llm/src/protocols/shared.ts:155–156  ·  view source on GitHub ↗
(route: string, name: string, raw: string)

Source from the content-addressed store, hash-verified

153 * routes: `Invalid JSON input for <route> tool call <name>`.
154 */
155export const parseToolInput = (route: string, name: string, raw: string) =>
156 parseJson(route, raw || "{}", `Invalid JSON input for ${route} tool call ${name}`)
157
158export const IMAGE_MIMES = ["image/png", "image/jpeg", "image/gif", "image/webp"] as const
159export const VIDEO_MIMES = ["video/mp4", "video/webm", "video/quicktime"] as const

Callers 1

toolCallFunction · 0.90

Calls 1

parseJsonFunction · 0.70

Tested by

no test coverage detected