Development
Convierte definiciones JSON/YAML de JSON Schema en codigo Zod listo para usar en proyectos TypeScript, con objetos anidados, arreglos, enums y reglas comunes de validacion
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'https://api.elysiatools.com/es/api/tools/json-schema-to-zod-schema-converter' \
-H 'Content-Type: application/json' \
-d '{"schemaInput":"{\n \"type\": \"object\",\n \"required\": [\"email\"],\n \"properties\": {\n \"email\": { \"type\": \"string\", \"format\": \"email\" },\n \"age\": { \"type\": \"integer\", \"minimum\": 18 }\n }\n}","sourceFormat":"json","rootSchemaName":"userSchema","namingStyle":"camel","outputMode":"schema-and-type","includeDescriptions":true}'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST https://api.elysiatools.com/es/api/tools/json-schema-to-zod-schema-converter| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| schemaInput | textarea | Sí | — |
| sourceFormat | select | No | — |
| rootSchemaName | text | No | — |
| namingStyle | select | No | — |
| outputMode | select | No | — |
Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-json-schema-to-zod-schema-converter": {
"name": "json-schema-to-zod-schema-converter",
"description": "Convierte definiciones JSON/YAML de JSON Schema en codigo Zod listo para usar en proyectos TypeScript, con objetos anidados, arreglos, enums y reglas comunes de validacion",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=json-schema-to-zod-schema-converter",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "json-schema-to-zod-schema-converter",
"arguments": {
"schemaInput": "{\n \"type\": \"object\",\n \"required\": [\"email\"],\n \"properties\": {\n \"email\": { \"type\": \"string\", \"format\": \"email\" },\n \"age\": { \"type\": \"integer\", \"minimum\": 18 }\n }\n}",
"sourceFormat": "json",
"rootSchemaName": "userSchema",
"namingStyle": "camel",
"outputMode": "schema-and-type",
"includeDescriptions": true
}
}
}| includeDescriptions |
| checkbox |
| No |
| — |
Resultado de texto
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}¿Dudas o problemas? Contacta con [email protected]