Skip to content

get_screen returns incomplete screen data — missing theme, designMd, screenMetadata #138

@icebear0828

Description

@icebear0828

Summary

get_screen returns only 7 fields for a screen resource, while generate_screen_from_text returns 14 fields for the same screen. This means theme.designMd (and other metadata) is only available immediately after generation and cannot be retrieved later.

Evidence

Tested against the live MCP server (stitch.googleapis.com/mcp):

── generate_screen_from_text ──
keys: designSystem, deviceType, generatedBy, height, htmlCode, id, name, prompt,
      screenMetadata, screenType, screenshot, theme, title, width  (14 fields)
has theme.designMd? true  (5809 chars)

── get_screen (same screen) ──  
keys: deviceType, height, htmlCode, name, screenshot, title, width  (7 fields)
has theme? false

Missing fields in get_screen

Field In generate In get_screen
theme (designMd)
designSystem
screenMetadata
prompt
generatedBy
screenType
id

Impact

  • SDK users who cache the Screen object from generate() get designMd. Users who later retrieve the screen via get_screen / project.getScreen() do not.
  • The web UI at stitch.withgoogle.com can display design.md — likely because it caches from the generate response. But any fresh client cannot access it.
  • A GET endpoint for a resource should return its complete representation.

Environment

  • @google/stitch-sdk v0.0.3
  • MCP server: stitch.googleapis.com/mcp

Metadata

Metadata

Assignees

No one assigned

    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