Skip to content

Add image support for tool call results in Anthropic provider#2

Open
stephenbaldwin wants to merge 1 commit intomainfrom
patched
Open

Add image support for tool call results in Anthropic provider#2
stephenbaldwin wants to merge 1 commit intomainfrom
patched

Conversation

@stephenbaldwin
Copy link
Copy Markdown
Collaborator

When a tool result contains images (screenshots), the encoder now:

  • Detects if any content parts are :image or :image_url types
  • Encodes all parts as Anthropic content blocks (text + image)
  • Falls back to simple string format for text-only results

This allows Claude to see images returned from MCP tool calls.

Description

Brief description of changes.

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Breaking Changes

Testing

  • Tests pass (mix test)
  • Quality checks pass (mix quality)

Checklist

  • My code follows the project's style guidelines
  • I have updated the documentation accordingly
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass
  • My commits follow conventional commit format
  • I have NOT edited CHANGELOG.md (it is auto-generated by git_ops)

Related Issues

Closes #

When a tool result contains images (screenshots), the encoder now:
- Detects if any content parts are :image or :image_url types
- Encodes all parts as Anthropic content blocks (text + image)
- Falls back to simple string format for text-only results

This allows Claude to see images returned from MCP tool calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant