darwin-sdk Python client in narrow Pydantic AI tools. Let generated Darwin models validate API responses and keep the agent-facing tool descriptions focused on when each operation is appropriate.
Copy the Pydantic AI MCP recipe.
Search requires one natural-language query. Action mutations require exact identifiers and stable request IDs. Validate all model-produced tool arguments before sending them to Darwin.
Never coerce a structured nonterminal Action state into a successful return value merely to satisfy an agent result schema.
Separate domain models
Keep validation strict at the Darwin boundary and let the application decide how much of the response belongs in model context.