Json To Python Class

Data REST API MCP

Generate Python class source code from a JSON object as a dataclass, a Pydantic model, or a plain class. Nested objects become separate classes, field names become snake_case, and type hints are optional.

This page documents the HTTP endpoint POST /api/tools/json-to-python-class/execute. See the MCP reference →

Call it over REST

POST https://api.findutils.com/api/tools/json-to-python-class/execute · no API keys · 60 requests/min per IP

Execute — verified arguments

curl -X POST https://api.findutils.com/api/tools/json-to-python-class/execute \
  -H "Content-Type: application/json" \
  -d '{
    "json": "{\"userId\":1,\"firstName\":\"A\",\"tags\":[\"x\"]}"
  }'

Parameter schema for this endpoint

curl https://api.findutils.com/api/tools/json-to-python-class

Interactive docs · OpenAPI 3.1 spec · All REST tools

Input schema

Argument Type Required Description
json string yes JSON object to convert (the root must be an object).
class_name string no Name of the root class. Default: "Root". Default: "Root".
class_type string (dataclass | pydantic | plain) no Class style: "dataclass", "pydantic", or "plain". Default: "dataclass". Default: "dataclass".
add_type_hints boolean no Add type hints (str, int, List[...], Optional[Any]). Default: true. Default: true.
generate_init boolean no For class_type "plain": generate an __init__ method. Default: true. Default: true.

Example arguments (verified)

{
  "json": {
    "userId": 1,
    "firstName": "A",
    "tags": [
      "x"
    ]
  }
}

Arguments that carry JSON as a string are shown decoded for readability. The Copy button copies the exact wire arguments.

Also an MCP tool

Claude, Cursor, and any MCP client can call this tool as findutils:json_to_python_class after one connect command.

Connect once

claude mcp add findutils --transport http https://mcp.findutils.com/
Open the MCP reference for Json To Python Class →

More Data tools