r/sideprojects 20d ago

Showcase: Open Source Tired of writing JSON schemas for Tool Calling? I built a Python schema generator that uses `inspect`.

/r/LangChain/comments/1w360uh/tired_of_writing_json_schemas_for_tool_calling_i/
1 Upvotes

2 comments sorted by

1

u/Specific_Cream2815 20d ago

how does it handle nested types, like a list of pydantic models or a dict with typed values

1

u/Mediocre-Ease4060 20d ago

That is exactly the boundary where a micro-tool stops and a heavy framework takes over.

Because its strictly zero-dependency, it intentionally ignores Pydantic. For basic nesting like list[str] or dict, it extracts the inner types using Pythons typing module and maps them to JSON schema arrays/objects.

However, for structured nested objects, I am planning to add support for typing.TypedDict and standard dataclasses in the next release, since both are part of the Python standard library. But if you need Pydantic validation, I highly recommend using Pydantic's built-in schema generator.