Skip to content

MCP tools should not return the full CallToolResult #1614

@samuelcolvin

Description

@samuelcolvin

Initial Checks

Description

  • if all parts are text, I think we should return it as concatenated text, perhaps '\n'.join(c.text for c in call.context)
  • if they're all images, we should presumably return images images are multimodal chunks
  • not sure what to do with embedded resources

The most common case is just to return a single chunk of text.

Example Code

Python, Pydantic AI & LLM client version

-

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions