MCPcopy Create free account
hub / github.com/Noumena-Network/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}

Callers 5

toolToAPISchemaFunction · 0.85
logContextMetricsFunction · 0.85
generateCompanionSoulFunction · 0.85
startMCPServerFunction · 0.85

Calls 2

setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected