PydanticAI Integration

async agentstr.mcp.pydantic.to_pydantic_tools(nostr_mcp_client: NostrMCPClient) list[Tool][source]

Convert tools from the MCP client to Pydantic tools.

Parameters:

nostr_mcp_client – An instance of NostrMCPClient to fetch tools from.

Returns:

A list of Pydantic tools that wrap the MCP tools.

This module provides integration with PydanticAI tools, enabling conversion between MCP tools and PydanticAI’s tool format.