get_save_script
Retrieve save instructions for a plot generated in the current session, offering right-click, filesystem, or MCP resource methods to save it locally.
Instructions
Return guidance for saving a plot generated in THIS SESSION to the user's local filesystem.
WHEN TO USE THIS TOOL: Call this only when the user explicitly asks for save guidance for a specific plot — for example, "how do I save the volcano plot to my Downloads folder?" or "I can't right-click — give me another way to save the plot." By default plot tools (create_volcano_plot, create_venn_diagram) return only a SHORT save hint to keep response sizes manageable. The detailed save options are delivered on demand via this tool, so they don't burn conversation context unless the user actually wants them.
HOW IT WORKS: Each plot tool registers the PNG bytes of the plot it generated in the calling session's registry (up to the last 8 plots; older entries are evicted FIFO). Calling this tool with the plot's suggested filename returns a markdown block with three save options:
Option A (right-click save on the inline image)
Option B (ask your LLM client to save via filesystem access, optionally re-fetching the canonical bytes through fetch_plot or the plot:// resource if the inline image was corrupted)
Option C (fetch the canonical PNG bytes via resources/read on the plot://<session_id>/ URI for clients that support MCP resources)
The response itself contains no PNG bytes — only references to the plot:// resource URI and the fetch_plot tool, both of which deliver the bytes through a separate request.
LISTING AVAILABLE PLOTS:
Call this tool with no filename argument to list the filenames
of all plots currently held in this session's registry. Useful when
the user asks for save guidance but doesn't remember which plot they
want.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | Suggested filename of a recently generated plot (e.g. 'volcano_plot_OSD-244_expression_30_days_vs_60_days.png'). Look at the most recent create_volcano_plot or create_venn_diagram response — the filename appears in the 'Save' block. Omit this parameter to list the filenames of all plots currently available in this session's registry. | |
| session_id | No | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on every tool call. If the server replies that the session is unknown or expired, call `create_session()` again and use the new id. |