v2.6.0
What's New
MCP Output Schema Support
This release adds support for typed output schemas from MCP (Model Context Protocol) tools. When an MCP server provides an outputSchema for a tool, atomic-agents now creates a properly typed Pydantic model instead of using a generic output schema.
Features
- Typed Output Schemas: Tools with MCP-provided
outputSchemanow generate typed Pydantic models with proper field definitions - Automatic Schema Detection: The system automatically detects when an MCP tool has an output schema and creates the appropriate typed model
- Backwards Compatible: Tools without
outputSchemacontinue to work exactly as before with the genericresultfield
Improvements
- Enhanced error handling for structured content parsing with clear error messages
- Added debug logging for JSON parse failures to aid troubleshooting
- Added type validation for
structuredContentresponses - Improved documentation for
is_output_schemaparameter explaining discriminated union usage
Bug Fixes
- Fixed silent failure when
structuredContenthas unexpected type (now raisesTypeError) - Fixed fallback to generic handling that would fail for typed schemas
- Added type check on content arrays before indexing to prevent errors on non-list types