Skip to content

check_staging: return staged image inline in Claude chat (MCP image content block) alongside the download URL #3

Description

@LarryWalkerDEV

Context

All 4 registered tools return text-only. When staging completes, the client gets a URL string but never sees the image in the Claude Cowork conversation. The inline pattern already exists in this repo — the UNREGISTERED src/tools/floor-plan.ts:75-86 fetches the result and returns {type:'image', data, mimeType} via fetchImageAsBase64. Apply that pattern to check_staging.

Acceptance criteria

  • When a staging job is completed, check_staging returns content [{type:'image', data:<base64>, mimeType:'image/jpeg'}, {type:'text', text:'Fertig! Download: <url>...'}] — inline preview PLUS the existing URL text.
  • Preview payload budget: base64 data ≤ ~1 MB. If the original exceeds it, fetch a downscaled variant instead of the full-res file (Supabase Storage image-transform URL ?width=1024 on the render/image endpoint, or an app-provided thumbnail URL — builder's choice, but the budget is the gate).
  • If the image fetch fails, degrade gracefully to today's text-only response (never fail the tool because the preview failed).
  • In-progress and failed states unchanged (text-only).
  • Test: unit test with a mocked completed-status app response asserting the content array contains an image block + text block; mocked fetch-failure asserts text-only fallback.
  • npx tsc --noEmit exits 0.

Guardrails

German user-facing text. Do not register the deferred Phase-F tools as part of this work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions