set_output_directory
Set the session output directory before generating plots or CSV files so every downloadable result is saved to the user's chosen local path.
Instructions
Configure the output directory for files generated in THIS SESSION.
WHEN TO USE THIS TOOL: Call this tool at the START of a session (right after create_session), before any tool that produces a downloadable file (create_volcano_plot, create_venn_diagram, or any tool that emits a CSV). The path you specify is where the user wants finished files to end up on THEIR OWN local machine.
WHAT IT DOES: Stores the provided path string in the server's session-scoped state (keyed on your session_id — other sessions cannot see or change it). Every subsequent file-producing tool in this session uses this path:
As the user-facing save location shown in the response summary.
As the default target path in the save guidance emitted with every plot.
If the server is running locally (stdio transport), the server ALSO writes the file directly to this path.
IMPORTANT — DEPLOYMENT REALITY:
When this MCP server is deployed remotely (ECS Fargate or any other
container service), it runs in a container whose filesystem is NOT
reachable from the user's machine. The server CANNOT write a file
directly to the user's local disk over the network — no MCP server in
a container can. The path you set here is a suggestion that propagates
through the response in three ways, any of which lets the user save
the file locally:
(a) The plot is returned inline as ImageContent and renders in any
MCP client that displays images (Claude Desktop, Cursor, Cline,
Claude.ai web, ChatGPT, Gemini, etc.). The user can right-click
and "Save Image As" — most clients default to the user's
Downloads folder, which is usually what was asked for.
(b) The path you set appears in the save guidance in the response.
LLM clients with local filesystem access (Claude Code, Cursor,
Cline, Claude Desktop with a filesystem MCP server) can write
the file at exactly this path, re-fetching the canonical bytes
via fetch_plot or the plot:// resource if needed.
(c) Users without LLM-mediated filesystem access can save the
inline image or the inline CSV text themselves.
VALIDATION: The path is stored as-is (the server does not verify it exists on the user's machine — it has no way to do so from inside a container). If you pass a relative path or an obviously malformed string the server will accept it; the failure will surface when the user tries to save the file locally.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path on the USER's local machine where output files (volcano plots, Venn diagrams, CSV exports) should be saved. Examples: '/Users/jane/Downloads', '/home/jane/Downloads', 'C:/Users/Jane/Downloads' (forward slashes work on Windows too with pathlib). Avoid trailing path separators. | |
| 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. |