Skip to content

Forward rich image display outputs as MCP ImageContent blocks#16

Open
ncoop57 wants to merge 5 commits into
mainfrom
images
Open

Forward rich image display outputs as MCP ImageContent blocks#16
ncoop57 wants to merge 5 commits into
mainfrom
images

Conversation

@ncoop57

@ncoop57 ncoop57 commented Jul 11, 2026

Copy link
Copy Markdown

What

Adds support for forwarding image display outputs (PNG, JPEG, GIF, WebP) from the worker as MCP ImageContent blocks, so MCP clients can receive and render images natively.

How

  • CLI worker: New --media flag appends <display_data mime="...">base64</media> elements after rendered text for image display outputs.
  • MCP server: New media=True parameter on run_mcp (default). _split_media extracts these elements from worker responses and converts image types to ImageContent blocks. Text-only responses are unchanged (returned as a plain string).

Docs

Updated skill.py documentation to describe the new image-forwarding behavior.

NB: This PR requires fastcore's PR to be merged first.

@ncoop57 ncoop57 added the enhancement New feature or request label Jul 11, 2026
@ncoop57
ncoop57 marked this pull request as draft July 11, 2026 19:03
jph00 and others added 4 commits July 14, 2026 09:49
# Conflicts:
#	clikernel/cli.py
#	clikernel/dojo.py
#	clikernel/skill.py
#	tests/test_cli.py
#	tests/test_rules.py
@ncoop57
ncoop57 marked this pull request as ready for review July 20, 2026 19:06
@ncoop57
ncoop57 requested a review from jph00 July 20, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants