Skip to content

Handle plot and HTML outputs in btwExtra tools #1

Description

@brianmsm

Current btwExtra covers text outputs (run-R-code). We still need:

  • Plot/graphics handling: capture base/ggplot output and return as image (e.g., base64 or temp file path) so MCP/LLM can view plots.
  • HTML/table output handling: capture HTML widgets/gt/kableExtra output and return a viewable representation (HTML or PNG snapshot).

Scope ideas:

  • Add a plot capture helper that runs code and saves last plot to PNG; extend run-r-code tool or add a new tool ().
  • For HTML outputs (gt, htmlwidgets), capture the rendered HTML and provide a safe snapshot (HTML and, optionally, PNG for clients that can render images).
  • Consider registration flags/annotations for read-only vs. file-writing behavior.

This issue tracks designing/implementing plot/HTML output support to complement the existing text-only behavior.

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