Skip to main content
Some MCP servers declare an output schema and return their answer as structuredContent. Agno surfaces that payload as the tool output so the agent can answer from it, and preserves the original typed object on ToolResult.metadata["structured_content"] for hooks and observability.
structured_content.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your Anthropic API key

4

Run the example

Save the code above as structured_content.py, then run:
Full source: cookbook/91_tools/mcp/structured_content.py