Repository navigation
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | fffe8c0 | Nov 23 2026, 12:59 PM |
tnkuehne
added a commit
that referenced
this pull request
Nov 23, 2026
## Problem The MCP server sends every `call` and `execute` result as one JSON text block. An image a script returns reaches the model as base64 text it cannot see, and it counts against the 1 MiB result limit. ## Change **Media blocks in a result become MCP content blocks.** - `call` and `execute` find MCP `image`, `audio` and blob `resource` blocks in the result, at any depth. - Each one is sent as its own content block. The JSON keeps the block without its bytes, plus `contentIndex`, the block's index in `content`. - A block that the result repeats is sent once. - base64url, unpadded and line-wrapped data become standard base64. - Text resources are readable as JSON and stay in it. Values that are not valid blocks stay JSON unchanged. **Limits.** - A result carries up to 1 MiB of JSON plus 5 MiB of media. - Service results inside `execute` may be up to 6 MiB, so a script can return a file it reads. - Service input stays limited to 1 MiB. **The `execute` description tells agents how to return images and files.** ## Tests - Unit tests cover lifting at any depth, deduplication, base64 normalization, text resources and invalid blocks staying JSON, and both limits. - The service integration test runs a script that returns a 2 MiB image in workerd and celld, and checks the text block and the image block. - Ran `pnpm check` and `RUN_SERVICE_TESTS=1` for `app-services-runtime.test.ts`. The docs follow in #332. <!-- greptile_comment --> <!-- greptile_summary --> <h2><a href="https://app.greptile.com/api/retrigger?id=116546427&sig=16047278466d5056c276664c8825466abe79970391796e04da3df882d27d7bc4"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><a href="https://app.greptile.com/-/switch-tenant?tenant=mendra&next=%2Fwidefleet%2Fwidefleet%2Fpull%2F331&utm_source=greptile_review&utm_medium=github&utm_campaign=view_in_greptile"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img alt="View in Greptile" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2" align="right"></picture></a>Confidence Score: 5/5</h2> <!-- greptile-impact-verdict --> The PR appears safe to merge; no new actionable issues were found. <details open><summary><h3>Summary</h3></summary> Returns images, audio, and files as MCP content blocks while keeping JSON references to them. - MCP results send images, audio, and files as media blocks. All four supplied previous threads are addressed: extra fields remain in JSON, large service responses have coverage, different metadata stays separate, and matching metadata shares one block. None of those threads supplied a Comment number. </details> <details open><summary><h3>Diagram</h3></summary> ```mermaid %%{init: {'theme': 'neutral'}}%% flowchart LR A[Service call or script result] --> B[Find media blocks] B --> C[Compare blocks including metadata] C --> D[JSON with contentIndex references] C --> E[Unique media blocks] D --> F[Check JSON limit] E --> G[Check media limit] F --> H[MCP content array] G --> H ``` </details> <!-- greptile_confidence_score:5 --> <sub>Reviews (4) · Last reviewed commit: ["Compare media blocks independent of key ..."](61834a7) · [Reviewed by Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub> <!-- /greptile_comment -->
tnkuehne
force-pushed
the
docs/mcp-media-blocks
branch
from
November 23, 2026 12:58
8841da0 to
fffe8c0
Compare
tnkuehne
marked this pull request as draft
November 23, 2026 12:58
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
executescript returns an image or a file as an MCP block, and states the new limits: 1 MiB of JSON plus 5 MiB of images and files.executereturns file content up to 5 MiB as MCP blocks.Publication
Implementation: #331. This stays in draft until a hosted release includes #331, because the template description is published from
mainright away.

Confidence Score: 5/5
The documentation changes appear safe to merge.Summary
Documents how
executereturns images and files as MCP blocks.Reviews (3) · Last reviewed commit: "Read Drive content from the call's data ..." · Reviewed by Greptile