Skip to content

Getting Intermediate responses from MCP Tool Calls #1748

@Rockyyost

Description

@Rockyyost

Question

Does Pydantic AI have a way to receive streamed events/message during a tool call operation on an MCP Server?

Using the python lib FastMCP, looks like I can "yield" messages or use ctx.info to send string back.

What I'd like to do is send back to the user (or the LLM) any messages the tool is sending back before it gets the final response.

Additional Context

FastMCP 2.3.3
Pydantic AI 0.1.8
Python 3.10.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions