Skip to content

ReferenceLook things up as you need them.

MCP tools ​

Every tool ganymede mcp and ganymede serve --mcp offer an agent, with its parameters, as the agent's tools/list shows them. Agents over MCP has setup, and how the tools fit together. With --read-only or --no-execute, the tools that would edit or run stay listed and refuse (Options).

cell_add ​

Add a cell without running it: Markdown narration (the default), or with mode: recorded a step that ran outside the kernel. With answers set to a request cell's id, it goes below that request and marks it done. Returns the new cell's id.

ParameterTypeDescription
source (required)stringThe cell's source: Markdown, or the command or step it records.
cell_typemarkdown, code, rawDefault markdown.
modenote (Narration), recorded (A step that ran outside the kernel (a shell command, a file the agent wrote), recorded so the notebook tells the whole story)Default note.
afterstringInsert after this cell id (default: at the end).
pathstringNotebook path; the one last opened when left out.
markstringA read mark (from an @@read line) to move past the new cell, as if its reader had added it: for a hook adding a cell on an agent's behalf, so the agent isn't told of it as someone else's.
answersstringThe id of a request cell this cell answers: the cell goes after it (unless after says otherwise), and the request is marked done, so it is no longer reported as a request.

cell_clear_outputs ​

Leave a code cell's outputs out of the notebook: clears them now and whenever the cell runs again through these tools. For output too large or too private to keep; outputs are the record of the run, so keep them otherwise. keep: true undoes it for the next run.

ParameterTypeDescription
id (required)stringThe code cell's id.
keepbooleantrue keeps the cell's outputs again from its next run.
pathstringNotebook path; the one last opened when left out.

cell_delete ​

Delete a cell. Refused when someone else changed the cell since your last read; read their change in with notebook_read(since), then redo it.

ParameterTypeDescription
id (required)stringThe cell's id.
pathstringNotebook path; the one last opened when left out.

cell_edit ​

Replace a cell's source; with run: true, run it after. The replaced source is kept in the cell's metadata.ganymede.agent.history; to remove a secret, delete the cell instead. Refused when someone else changed the cell since your last read; read their change in with notebook_read(since), then redo it.

ParameterTypeDescription
id (required)stringThe cell's id.
source (required)stringThe new source, in place of the whole cell's.
runbooleanRun the cell after editing it (code cells).
timeoutintegerWith run: seconds to wait for the result (default 600). The cell keeps running after a timeout.
keep_outputsbooleanWith run: keep the outputs in the notebook (default: as the cell had it). false leaves them out, as cell_run's keep_outputs.
pathstringNotebook path; the one last opened when left out.

cell_move ​

Move a cell after another one, or to the top. Refused when someone else changed the cell since your last read; read their change in with notebook_read(since), then redo it.

ParameterTypeDescription
id (required)stringThe id of the cell to move.
afterstringPut the cell after this one; at the top when left out.
pathstringNotebook path; the one last opened when left out.

cell_run ​

Run code in the notebook's kernel and return its outputs. By default the code is recorded as a new code cell (at the end, or after after); record: false runs it as scratch work that leaves nothing in the notebook and doesn't advance the execution count; it shares the kernel's state, so variables it assigns stay defined.

ParameterTypeDescription
source (required)stringCode to run.
afterstringInsert after this cell id (default: at the end).
recordbooleanRecord the run as a cell (default true). false is a scratch run: it runs in the kernel and leaves nothing in the notebook, but its variables stay defined in the kernel.
timeoutintegerSeconds to wait for the result (default 600). A recorded cell keeps running after a timeout; a scratch run is interrupted.
keep_outputsbooleanKeep the outputs in the notebook (default true). false records the code but leaves its outputs out of the notebook, now and when it runs again: for output too large or too private to keep. You still get the outputs back.
pathstringNotebook path; the one last opened when left out.

cell_snapshot ​

Snapshot cells as Markdown to show the user: the code in a fenced block, each chart or image saved as a PNG (or its own format) file and linked by path, tables (table outputs and HTML tables) as Markdown tables, other output as text. The images also come back to you as images, whatever the server's image setting, so use this to look at a chart before describing it. Runs nothing.

ParameterTypeDescription
ids (required)array of stringCell ids, in the order to show them.
dirstringSave images in this directory, relative to this connection's directory, such as journal/snapshots, for a report next to the notebook. By default they go to a directory outside the server root that only you can read.
codebooleanInclude each code cell's source (default true).
max_rowsintegerRows to keep of a table (default 20).
pathstringNotebook path; the one last opened when left out.

kernel_control ​

Interrupt, restart or shut down the notebook's kernel.

ParameterTypeDescription
action (required)interrupt, restart, shutdownWhat to do to the notebook's kernel.
pathstringNotebook path; the one last opened when left out.

kernelspecs_list ​

List the kernels that can run notebooks here, the server's default, and the default for a folder when a .ganymede.toml there or above sets one (kernel = "<name>"). New notebooks in that folder start it unless notebook_open names a kernel.

ParameterTypeDescription
dirstringThe folder to report a default for, relative to this connection's directory (default: that directory).

notebook_open ​

Open a notebook, creating it if it doesn't exist, and start or join its kernel. Later calls may leave out path. Paths are relative to the directory the reply names: the server's root, or your own folder when ganymede mcp forwards to a server rooted above it, where a leading / starts at the root. Returns a compact view of the notebook.

ParameterTypeDescription
path (required)stringNotebook path, such as analysis/run.ipynb, relative to this connection's directory (notebook_open names it); a leading / starts at the server root.
kernelstringKernelspec name for a new notebook or a new kernel (default: the notebook's own, else its folder's default from .ganymede.toml, else the server's default).
titlestringFor a new notebook: a title, written as a first Markdown cell.

notebook_publish ​

Publish the notebook as one self-contained HTML page to read and share: title, contents, Markdown as prose, charts and tables inline, code folded under each result, light and dark. The page holds only the notebook's cells and outputs (no metadata), makes no network requests and runs no notebook script; the server root, home directory, the server token and mcp_token (each 8 characters or more) are replaced wherever they appear as a whole name. Unless code is hidden or download is false, the page also carries a copy of the notebook with a Download notebook button, with the same replacements and without metadata or recorded parameters. Saves it under the server root, at out relative to this connection's directory (default published/<name>.html beside the notebook), replacing an earlier published page but no other file unless overwrite: true, and returns its path. Runs nothing; run the notebook first so the outputs are current.

ParameterTypeDescription
outstringWhere to save the page, relative to this connection's directory, ending in .html. Default: published/<name>.html beside the notebook.
codestringHow code shows: folded under each result (default), shown, or hidden.
bylinestringA line under the title. Default: today's date.
overwritebooleanReplace out even when it isn't an earlier published page.
downloadbooleanPut a copy of the notebook in the page, with a Download notebook button: redacted as the page is, without metadata or recorded parameters. Default: on, unless code is hidden.
pathstringNotebook path; the one last opened when left out.

notebook_read ​

Read a notebook as text: cells with their ids, sources and outputs, then an @@read <mark> line. With since: <mark>, return only the cells others (a person, another agent) added, edited, deleted, moved or ran since the read that gave the mark; your own edits and runs through these tools are left out.

ParameterTypeDescription
pathstringNotebook path; the one last opened when left out.
sincestringA read mark from an earlier read's @@read line: return only the cells others added, edited, deleted, moved or ran since that read. Without path, the mark's notebook. The mark becomes this connection's for that notebook, so its own edits move it.

notebook_requests ​

List the requests to you that are still open: Markdown cells starting @agent (or @ and your client's name) that a person wrote in a notebook open in this server, through JupyterLab or the apps, and that no cell answers yet. Answer one with cell_add, answers set to its id.

ParameterTypeDescription
pathstringNotebook path; every notebook open in the server under this connection's folder when left out.
editsbooleanAlso list each notebook read, as an @@notebook line, and every other cell a person last changed, as an @@edit line with a hash of its kind and source (a spike, for ganymede mcp watch --edits).

notebook_run_all ​

Run every code cell in order, after restarting the kernel unless restart: false, and return the notebook.

ParameterTypeDescription
restartbooleanRestart the kernel first (default true).
timeoutintegerSeconds to wait for every cell to finish (default 600). Cells keep running after a timeout.
pathstringNotebook path; the one last opened when left out.

notebooks_list ​

List notebooks and directories in a directory.

ParameterTypeDescription
dirstringDirectory relative to this connection's directory (default: that directory); a leading / starts at the server root.

Search notebooks under a directory (default: this connection's directory, with subdirectories) for cells containing every word of query, ignoring case. Searches sources, and text outputs with outputs: true. Returns each matching cell's notebook, title, index, id, type and an excerpt; read a hit in full with notebook_read. Use it before starting a journal, to find what earlier notebooks found.

ParameterTypeDescription
query (required)stringWords to find, all of them, in any case and order.
dirstringDirectory to search, with its subdirectories, relative to this connection's directory (default: that directory); a leading / starts at the server root.
outputsbooleanSearch text outputs too, not only sources (default false).
cell_typestringOnly cells of this type: code, markdown or raw.
limitintegerMost matching cells to return (default 20, at most 200).

MIT license.