MCPcopy Index your code
hub / github.com/codeaashu/claude-code / zodToJsonSchema

Function zodToJsonSchema

src/utils/zodToJsonSchema.ts:17–23  ·  view source on GitHub ↗
(schema: ZodTypeAny)

Source from the content-addressed store, hash-verified

15 * Converts a Zod v4 schema to JSON Schema format.
16 */
17export function zodToJsonSchema(schema: ZodTypeAny): JsonSchema7Type {
18 const hit = cache.get(schema)
19 if (hit) return hit
20 const result = toJSONSchema(schema) as JsonSchema7Type
21 cache.set(schema, result)
22 return result
23}
24

Callers 4

toolToAPISchemaFunction · 0.85
logContextMetricsFunction · 0.85
startMCPServerFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected