// Use PROACTIVELY when users need guaranteed schema compliance or validated tool inputs from Anthropic's structured outputs feature. Expert advisor for choosing between JSON outputs (data extraction/formatting) and strict tool use (agentic workflows). Analyzes requirements, explains trade-offs, and delegates to specialized implementation skills. Not for simple text responses or unstructured outputs.
| name | structured-outputs-advisor |
| version | 0.2.1 |
| description | Use PROACTIVELY when users need guaranteed schema compliance or validated tool inputs from Anthropic's structured outputs feature. Expert advisor for choosing between JSON outputs (data extraction/formatting) and strict tool use (agentic workflows). Analyzes requirements, explains trade-offs, and delegates to specialized implementation skills. Not for simple text responses or unstructured outputs. |
This skill serves as the entry point for implementing Anthropic's structured outputs feature. It helps developers choose between JSON outputs (for data extraction/formatting) and strict tool use (for agentic workflows), then delegates to specialized implementation skills. The advisor ensures developers select the right mode based on their use case and requirements.
Two Modes Available:
output_format) - Guaranteed JSON schema compliance for responsesstrict: true) - Validated tool parameters for function callsSpecialized Implementation Skills:
json-outputs-implementer - For data extraction, classification, API formattingstrict-tool-implementer - For agentic workflows, validated function callsTrigger Phrases:
Use Cases:
Questions to Ask:
What's your goal?
What's the data source?
What consumes the output?
How critical is schema compliance?
Use JSON Outputs (output_format) when:
Examples:
Use Strict Tool Use (strict: true) when:
Examples:
After determining the mode, delegate to the specialized skill:
For JSON Outputs:
I recommend using JSON outputs for your [use case].
I'm going to invoke the json-outputs-implementer skill to help you:
1. Design a production-ready JSON schema
2. Implement with SDK helpers (Pydantic/Zod)
3. Add validation and error handling
4. Optimize for production
[Launch json-outputs-implementer skill]
For Strict Tool Use:
I recommend using strict tool use for your [use case].
I'm going to invoke the strict-tool-implementer skill to help you:
1. Design validated tool schemas
2. Implement strict mode correctly
3. Build reliable agent workflows
4. Test and validate tool calls
[Launch strict-tool-implementer skill]
For Both Modes (Hybrid):
Your use case requires both modes:
- JSON outputs for [specific use case]
- Strict tool use for [specific use case]
I'll help you implement both, starting with [primary mode].
[Launch appropriate skill first, then the second one]
| Requirement | JSON Outputs | Strict Tool Use |
|---|---|---|
| Extract structured data | ✅ Primary use case | ❌ Not designed for this |
| Validate function parameters | ❌ Not designed for this | ✅ Primary use case |
| Multi-step agent workflows | ⚠️ Possible but not ideal | ✅ Designed for this |
| API response formatting | ✅ Ideal | ❌ Unnecessary |
| Database inserts (type safety) | ✅ Good fit | ⚠️ If via tool calls |
| Complex nested schemas | ✅ Supports this | ✅ Supports this |
| Classification tasks | ✅ Perfect fit | ❌ Overkill |
| Tool composition/chaining | ❌ Not applicable | ✅ Excellent |
Models Supported:
claude-sonnet-4-5)claude-opus-4-1)Beta Header Required:
anthropic-beta: structured-outputs-2025-11-13
Incompatible Features:
Compatible Features:
Analysis: Data extraction from unstructured text
Mode: JSON Outputs
Delegation: json-outputs-implementer
Reason: Single-step extraction with structured output format
Analysis: Multi-tool workflow (flights, hotels, activities)
Mode: Strict Tool Use
Delegation: strict-tool-implementer
Reason: Multiple validated tools in agent workflow
Analysis: Classification with guaranteed categories
Mode: JSON Outputs
Delegation: json-outputs-implementer
Reason: Single classification result, structured response
Analysis: Type-safe database operations Mode: JSON Outputs (if direct) OR Strict Tool Use (if via tool) Delegation: Depends on architecture Reason: Both work - choose based on system architecture
Analysis: Format responses for API consumption
Mode: JSON Outputs
Delegation: json-outputs-implementer
Reason: Output formatting is primary goal
# Extract contact information
from pydantic import BaseModel
from anthropic import Anthropic
class Contact(BaseModel):
name: str
email: str
plan: str
client = Anthropic()
response = client.beta.messages.parse(
model="claude-sonnet-4-5",
betas=["structured-outputs-2025-11-13"],
messages=[{"role": "user", "content": "Extract contact info..."}],
output_format=Contact,
)
contact = response.parsed_output # Guaranteed schema match
# Validated tool for agent workflow
response = client.beta.messages.create(
model="claude-sonnet-4-5",
betas=["structured-outputs-2025-11-13"],
messages=[{"role": "user", "content": "Book a flight..."}],
tools=[{
"name": "book_flight",
"strict": True, # Guarantees schema compliance
"input_schema": {
"type": "object",
"properties": {
"destination": {"type": "string"},
"passengers": {"type": "integer"}
},
"required": ["destination"],
"additionalProperties": False
}
}]
)
# Tool inputs guaranteed to match schema
Once mode is selected and you've delegated to the specialized skill, that skill will handle:
Official Documentation: https://docs.anthropic.com/en/docs/build-with-claude/structured-outputs
Related Skills:
json-outputs-implementer - Implement JSON outputs modestrict-tool-implementer - Implement strict tool use mode