Jupyter MCP Server
v1.29.0Add to your MCP client configuration:
Tools
list_files
read-onlyList all files and directories recursively in the Jupyter server's file system. Used to explore the file system structure of the Jupyter server or to find specific files or directories.
Parameters
pathstringargumentThe starting path to list from (empty string means root directory)
max_depthinteger[0, 3]1argumentMaximum depth to recurse into subdirectories
start_indexinteger>= 00argumentStarting index for pagination (0-based)
limitinteger>= 025argumentMaximum number of items to return (0 means no limit)
patternstringargumentGlob pattern to filter file paths
Returns
resultstringrequiredTab-separated table with columns: Path, Type, Size, Last_Modified. Includes pagination info header.
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "list_files",
"arguments": {
"path": "",
"max_depth": 1,
"start_index": 0,
"limit": 25,
"pattern": ""
}
}
}const result = await client.callTool("list_files", {
"path": "",
"max_depth": 1,
"start_index": 0,
"limit": 25,
"pattern": ""
});result = await session.call_tool("list_files", arguments={
"path": "",
"max_depth": 1,
"start_index": 0,
"limit": 25,
"pattern": ""
}){
"result": "string"
}list_kernels
read-onlyList all available kernels in the Jupyter server.
This tool shows all running and available kernel sessions on the Jupyter server, including their IDs, names, states, connection information, and kernel specifications. Useful for monitoring kernel resources and identifying specific kernels for connection.
Returns
resultstringrequiredTab-separated table with columns: ID, Name, Display_Name, Language, State, Connections, Last_Activity, Environment
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "list_kernels",
"arguments": {}
}
}const result = await client.callTool("list_kernels", {});result = await session.call_tool("list_kernels", arguments={}){
"result": "string"
}use_notebook
destructiveUse a notebook and activate it for following cell operations. All cell operations will be performed on the currently activated notebook. Activate new notebook will deactivate the previously activated notebook. Reactivate previously activated notebook using same notebook_name and notebook_path.
Parameters
notebook_namestringrequiredargumentUnique identifier for the notebook
notebook_pathstringrequiredargumentPath to the notebook file, relative to the Jupyter server root (e.g. 'notebook.ipynb')
modestringconnectcreateconnectargumentNotebook operation mode: 'connect' to connect to existing and activate it, 'create' to create new and activate it
kernel_idstringnullargumentSpecific kernel ID to use (will create new if skipped)
Returns
resultstringrequiredSuccess message with notebook information
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "use_notebook",
"arguments": {
"notebook_name": "string",
"notebook_path": "string",
"mode": "connect",
"kernel_id": null
}
}
}const result = await client.callTool("use_notebook", {
"notebook_name": "string",
"notebook_path": "string",
"mode": "connect",
"kernel_id": null
});result = await session.call_tool("use_notebook", arguments={
"notebook_name": "string",
"notebook_path": "string",
"mode": "connect",
"kernel_id": null
}){
"result": "string"
}list_notebooks
read-onlyList all notebooks that have been used via use_notebook tool
Returns
resultstringrequiredTSV formatted table with notebook information
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "list_notebooks",
"arguments": {}
}
}const result = await client.callTool("list_notebooks", {});result = await session.call_tool("list_notebooks", arguments={}){
"result": "string"
}restart_notebook
destructiveRestart the kernel for a specific notebook.
Parameters
notebook_namestringrequiredargumentNotebook identifier to restart
Returns
resultstringrequiredSuccess message
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "restart_notebook",
"arguments": {
"notebook_name": "string"
}
}
}const result = await client.callTool("restart_notebook", {
"notebook_name": "string"
});result = await session.call_tool("restart_notebook", arguments={
"notebook_name": "string"
}){
"result": "string"
}unuse_notebook
destructiveUnuse from a specific notebook and release its resources.
Parameters
notebook_namestringrequiredargumentNotebook identifier to disconnect
Returns
resultstringrequiredSuccess message
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "unuse_notebook",
"arguments": {
"notebook_name": "string"
}
}
}const result = await client.callTool("unuse_notebook", {
"notebook_name": "string"
});result = await session.call_tool("unuse_notebook", arguments={
"notebook_name": "string"
}){
"result": "string"
}read_notebook
read-onlyRead a notebook and return index, source content, type, execution count of each cell.
Using brief format to get a quick overview of the notebook structure and it's useful for locating specific cells for operations like delete or insert. Using detailed format to get detailed information of the notebook and it's useful for debugging and analysis.
It is recommended to use brief format with larger limit to get a overview of the notebook structure, then use detailed format with exact index and limit to get the detailed information of some specific cells.
Parameters
notebook_namestringrequiredargumentNotebook identifier to read
response_formatstringbriefdetailedbriefargumentResponse format: 'brief' will return first line and lines number, 'detailed' will return full cell source
start_indexinteger>= 00argumentStarting index for pagination (0-based)
limitinteger>= 020argumentMaximum number of items to return (0 means no limit)
Returns
resultstringrequiredNotebook content in the requested format
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "read_notebook",
"arguments": {
"notebook_name": "string",
"response_format": "brief",
"start_index": 0,
"limit": 20
}
}
}const result = await client.callTool("read_notebook", {
"notebook_name": "string",
"response_format": "brief",
"start_index": 0,
"limit": 20
});result = await session.call_tool("read_notebook", arguments={
"notebook_name": "string",
"response_format": "brief",
"start_index": 0,
"limit": 20
}){
"result": "string"
}insert_cell
destructiveInsert a cell to specified position from the currently activated notebook.
Body
cell_indexinteger>= -1requiredTarget index for insertion (0-based), use -1 to append at end
cell_typestringcodemarkdownrequiredType of cell to insert
cell_sourcestringrequiredSource content for the cell
notebook_namestring | nullnullTarget this specific connected notebook instead of the currently activated one. Use when multiple clients share this server, to avoid racing the shared 'current notebook' pointer. Omit to use the currently activated notebook.
Returns
resultstringrequiredSuccess message and the structure of its surrounding cells
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "insert_cell",
"arguments": {
"cell_index": -1,
"cell_type": "code",
"cell_source": "string",
"notebook_name": null
}
}
}const result = await client.callTool("insert_cell", {
"cell_index": -1,
"cell_type": "code",
"cell_source": "string",
"notebook_name": null
});result = await session.call_tool("insert_cell", arguments={
"cell_index": -1,
"cell_type": "code",
"cell_source": "string",
"notebook_name": null
}){
"cell_index": -1,
"cell_type": "code",
"cell_source": "string",
"notebook_name": null
}{
"result": "string"
}overwrite_cell_source
destructiveReplace the entire source of a cell in the currently activated notebook. Returns a diff showing the changes made.
Use this when rewriting a cell completely. For small, targeted changes, prefer edit_cell_source instead — it is safer for partial edits.
Body
cell_indexinteger>= 0requiredIndex of the cell to overwrite (0-based)
cell_sourcestringrequiredNew complete cell source
notebook_namestring | nullnullTarget this specific connected notebook instead of the currently activated one. Use when multiple clients share this server, to avoid racing the shared 'current notebook' pointer. Omit to use the currently activated notebook.
Returns
resultstringrequiredSuccess message with diff showing changes made
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "overwrite_cell_source",
"arguments": {
"cell_index": 0,
"cell_source": "string",
"notebook_name": null
}
}
}const result = await client.callTool("overwrite_cell_source", {
"cell_index": 0,
"cell_source": "string",
"notebook_name": null
});result = await session.call_tool("overwrite_cell_source", arguments={
"cell_index": 0,
"cell_source": "string",
"notebook_name": null
}){
"cell_index": 0,
"cell_source": "string",
"notebook_name": null
}{
"result": "string"
}edit_cell_source
destructivePerform a surgical find-and-replace within a cell's source (like an editor's Edit tool).
Finds old_string in the cell and replaces it with new_string. Matching is literal
(not regex) and may span multiple lines. By default, old_string must appear exactly once;
set replace_all=True for multiple occurrences. Returns a diff of the changes made.
Prefer this over overwrite_cell_source for small, targeted edits — it is safer because unchanged parts of the cell are left untouched. Use read_cell first to see the current source and construct an accurate old_string.
Body
cell_indexinteger>= 0requiredIndex of the cell to edit (0-based)
old_stringstringrequiredExact string to find in cell source
new_stringstringrequiredReplacement string
replace_allbooleanfalseReplace all occurrences (default: first only)
notebook_namestring | nullnullTarget this specific connected notebook instead of the currently activated one. Use when multiple clients share this server, to avoid racing the shared 'current notebook' pointer. Omit to use the currently activated notebook.
Returns
resultstringrequiredSuccess message with diff showing changes made
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "edit_cell_source",
"arguments": {
"cell_index": 0,
"old_string": "string",
"new_string": "string",
"replace_all": false,
"notebook_name": null
}
}
}const result = await client.callTool("edit_cell_source", {
"cell_index": 0,
"old_string": "string",
"new_string": "string",
"replace_all": false,
"notebook_name": null
});result = await session.call_tool("edit_cell_source", arguments={
"cell_index": 0,
"old_string": "string",
"new_string": "string",
"replace_all": false,
"notebook_name": null
}){
"cell_index": 0,
"old_string": "string",
"new_string": "string",
"replace_all": false,
"notebook_name": null
}{
"result": "string"
}execute_cell
destructiveExecute a cell from the currently activated notebook with timeout and return it's outputs
Parameters
cell_indexinteger>= 0requiredargumentIndex of the cell to execute (0-based)
timeoutinteger0argumentMaximum seconds to wait for execution (0 = use config default)
streambooleantrueargumentEnable streaming progress (including time indicator) updates for long-running cells
progress_intervalinteger5argumentSeconds between progress updates (MCP keepalive + optional stream log)
Returns
Returns MCP content array (text, image, or embedded resource).
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "execute_cell",
"arguments": {
"cell_index": 0,
"timeout": 0,
"stream": true,
"progress_interval": 5
}
}
}const result = await client.callTool("execute_cell", {
"cell_index": 0,
"timeout": 0,
"stream": true,
"progress_interval": 5
});result = await session.call_tool("execute_cell", arguments={
"cell_index": 0,
"timeout": 0,
"stream": true,
"progress_interval": 5
}){
"content": [
{
"type": "text",
"text": "..."
}
]
}insert_execute_code_cell
destructiveInsert a cell at specified index from the currently activated notebook and then execute it with timeout and return it's outputs It is a shortcut tool for insert_cell and execute_cell tools, recommended to use if you want to insert a cell and execute it at the same time
Parameters
cell_indexinteger>= -1requiredargumentIndex of the cell to insert and execute (0-based)
cell_sourcestringrequiredargumentCode source for the cell
timeoutinteger0argumentMaximum seconds to wait for execution (0 = use config default)
streambooleantrueargumentEnable streaming progress (including time indicator) updates for long-running cells
progress_intervalinteger5argumentSeconds between progress updates (MCP keepalive + optional stream log)
Returns
Returns MCP content array (text, image, or embedded resource).
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "insert_execute_code_cell",
"arguments": {
"cell_index": -1,
"cell_source": "string",
"timeout": 0,
"stream": true,
"progress_interval": 5
}
}
}const result = await client.callTool("insert_execute_code_cell", {
"cell_index": -1,
"cell_source": "string",
"timeout": 0,
"stream": true,
"progress_interval": 5
});result = await session.call_tool("insert_execute_code_cell", arguments={
"cell_index": -1,
"cell_source": "string",
"timeout": 0,
"stream": true,
"progress_interval": 5
}){
"content": [
{
"type": "text",
"text": "..."
}
]
}read_cell
read-onlyRead a specific cell from the currently activated notebook and return it's metadata (index, type, execution count), source and outputs (for code cells)
Body
cell_indexinteger>= 0requiredIndex of the cell to read (0-based)
include_outputsbooleantrueInclude outputs in the response (only for code cells)
notebook_namestring | nullnullTarget this specific connected notebook instead of the currently activated one. Use when multiple clients share this server, to avoid racing the shared 'current notebook' pointer. Omit to use the currently activated notebook.
Returns
Returns MCP content array (text, image, or embedded resource).
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "read_cell",
"arguments": {
"cell_index": 0,
"include_outputs": true,
"notebook_name": null
}
}
}const result = await client.callTool("read_cell", {
"cell_index": 0,
"include_outputs": true,
"notebook_name": null
});result = await session.call_tool("read_cell", arguments={
"cell_index": 0,
"include_outputs": true,
"notebook_name": null
}){
"cell_index": 0,
"include_outputs": true,
"notebook_name": null
}{
"content": [
{
"type": "text",
"text": "..."
}
]
}delete_cell
destructiveDelete specific cells from the currently activated notebook and return the cell source of deleted cells (if include_source=True).
Body
cell_indicesArray<integer>requiredList of cell indices to delete (0-based)
include_sourcebooleantrueWhether to include the source of deleted cells
notebook_namestring | nullnullTarget this specific connected notebook instead of the currently activated one. Use when multiple clients share this server, to avoid racing the shared 'current notebook' pointer. Omit to use the currently activated notebook.
Returns
resultstringrequiredSuccess message with list of deleted cells and their source (if include_source=True)
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "delete_cell",
"arguments": {
"cell_indices": [
0
],
"include_source": true,
"notebook_name": null
}
}
}const result = await client.callTool("delete_cell", {
"cell_indices": [
0
],
"include_source": true,
"notebook_name": null
});result = await session.call_tool("delete_cell", arguments={
"cell_indices": [
0
],
"include_source": true,
"notebook_name": null
}){
"cell_indices": [
0
],
"include_source": true,
"notebook_name": null
}{
"result": "string"
}clear_cell_output
destructiveClear the outputs and execution count of a single code cell in the currently activated notebook, without deleting the cell itself.
Body
cell_indexinteger>= 0requiredIndex of the code cell to clear (0-based)
notebook_namestring | nullnullTarget this specific connected notebook instead of the currently activated one. Use when multiple clients share this server, to avoid racing the shared 'current notebook' pointer. Omit to use the currently activated notebook.
Returns
resultstringrequiredSuccess message with the number of outputs removed
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "clear_cell_output",
"arguments": {
"cell_index": 0,
"notebook_name": null
}
}
}const result = await client.callTool("clear_cell_output", {
"cell_index": 0,
"notebook_name": null
});result = await session.call_tool("clear_cell_output", arguments={
"cell_index": 0,
"notebook_name": null
}){
"cell_index": 0,
"notebook_name": null
}{
"result": "string"
}move_cell
destructiveMove a cell from source_index to target_index within the currently activated notebook.
The cell is removed from source_index and placed at target_index. Cells in between shift to fill the gap. The cell's type, source, and outputs are preserved. Example: in a notebook [A, B, C, D], move_cell(1, 3) produces [A, C, D, B].
Use this tool instead of manually deleting and re-inserting a cell — it is atomic and preserves cell metadata. Use read_notebook first to see cell indices if needed.
Body
source_indexinteger>= 0requiredIndex of the cell to move (0-based)
target_indexinteger>= 0requiredDestination index where the cell will end up (0-based)
notebook_namestring | nullnullTarget this specific connected notebook instead of the currently activated one. Use when multiple clients share this server, to avoid racing the shared 'current notebook' pointer. Omit to use the currently activated notebook.
Returns
resultstringrequiredSuccess message with moved cell info and surrounding context
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "move_cell",
"arguments": {
"source_index": 0,
"target_index": 0,
"notebook_name": null
}
}
}const result = await client.callTool("move_cell", {
"source_index": 0,
"target_index": 0,
"notebook_name": null
});result = await session.call_tool("move_cell", arguments={
"source_index": 0,
"target_index": 0,
"notebook_name": null
}){
"source_index": 0,
"target_index": 0,
"notebook_name": null
}{
"result": "string"
}execute_code
destructiveExecute code directly in a kernel (not saved to notebook).
If use_sandbox selected an active sandbox, this tool executes on that
sandbox instead of a Jupyter kernel. This allows agents to switch between
kernel-backed and sandbox-backed execution using the same execute_code API.
Targets the current activated notebook's kernel by default. Pass kernel_id to execute in a specific kernel directly — including raw kernels with no notebook attached.
Recommended to use in following cases:
- Execute Jupyter magic commands(e.g.,
%timeit,%pip install xxx) - Performance profiling and debugging.
- View intermediate variable values(e.g.,
print(xxx),df.head()) - Temporary calculations and quick tests(e.g.,
np.mean(df['xxx'])) - Execute Shell commands in Jupyter server(e.g.,
!git xxx)
Under no circumstances should you use this tool to:
- Import new modules or perform variable assignments that affect subsequent Notebook execution
- Execute dangerous code that may harm the Jupyter server or the user's data without permission
Body
codestringrequiredCode to execute (supports magic commands with %, shell commands with !)
timeoutinteger30Maximum seconds to wait for execution (0 = use config default)
kernel_idstring | nullnullTarget an existing kernel by ID (e.g. a raw kernel with no notebook). If omitted, uses the current notebook's kernel.
progress_intervalinteger5Seconds between MCP progress keepalive updates during long-running execution
Returns
Returns MCP content array (text, image, or embedded resource).
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "execute_code",
"arguments": {
"code": "string",
"timeout": 30,
"kernel_id": null,
"progress_interval": 5
}
}
}const result = await client.callTool("execute_code", {
"code": "string",
"timeout": 30,
"kernel_id": null,
"progress_interval": 5
});result = await session.call_tool("execute_code", arguments={
"code": "string",
"timeout": 30,
"kernel_id": null,
"progress_interval": 5
}){
"code": "string",
"timeout": 30,
"kernel_id": null,
"progress_interval": 5
}{
"content": [
{
"type": "text",
"text": "..."
}
]
}connect_to_jupyter
destructiveConnect to a Jupyter server dynamically with URL and token.
This tool allows you to connect to different Jupyter servers without needing to restart the MCP server or modify configuration files. Particularly useful when:
- Working with multiple Jupyter servers with different ports/tokens
- Jupyter server token changes dynamically
- Need to switch between different Jupyter instances
Example usage:
- "Connect to http://localhost:8888 with token abc123"
- "Connect to http://localhost:8889 without authentication"
Body
jupyter_urlstringrequiredJupyter server URL to connect to (e.g., 'http://localhost:8888')
jupyter_tokenstring | nullnullJupyter server authentication token
providerstringjupyterProvider type
Returns
resultstringrequiredConnection status message
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "connect_to_jupyter",
"arguments": {
"jupyter_url": "string",
"jupyter_token": null,
"provider": "jupyter"
}
}
}const result = await client.callTool("connect_to_jupyter", {
"jupyter_url": "string",
"jupyter_token": null,
"provider": "jupyter"
});result = await session.call_tool("connect_to_jupyter", arguments={
"jupyter_url": "string",
"jupyter_token": null,
"provider": "jupyter"
}){
"jupyter_url": "string",
"jupyter_token": null,
"provider": "jupyter"
}{
"result": "string"
}launch_sandbox
destructiveLaunch a code sandbox that can be used instead of Jupyter kernels.
After launch, call use_sandbox to make execute_code run on this sandbox (as an alternative to notebook-bound kernel execution). Works in both MCP_SERVER and JUPYTER_SERVER modes.
Body
sandbox_namestringrequiredUnique sandbox identifier used by list/use/terminate tools
variantstring | nullnullSandbox variant to launch. If omitted, defaults to configured SANDBOX_VARIANT when it is non-jupyter; otherwise falls back to eval.
timeoutinteger>= 160Default execution timeout in seconds for this sandbox
environmentstring | nullnullOptional sandbox environment name (common for datalayer/modal variants)
gpustring | nullnullOptional GPU flavor / accelerator for supported variants (modal/datalayer examples: T4, A10G, A100, H100; kaggle examples: NvidiaTeslaT4, NvidiaTeslaP100, or aliases T4/P100).
server_urlstring | nullnullCode Sandbox proxy URL when using colab or kaggle variant
kernel_idstring | nullnullKernel ID when using colab or kaggle variant
proxy_tokenstring | nullnullColab code sandbox proxy token when using colab variant
channels_urlstring | nullnullNotebook session WebSocket channels URL to derive server_url/kernel_id (colab or kaggle variant)
tokenstring | nullnullDatalayer API token override, or Kaggle API token for the kaggle variant (falls back to KAGGLE_API_TOKEN)
run_urlstring | nullnullDatalayer run URL override
python_versionstring | nullnullModal Python version override (e.g. 3.12). Only used for modal variant.
Returns
Returns MCP content array (text, image, or embedded resource).
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "launch_sandbox",
"arguments": {
"sandbox_name": "string",
"variant": null,
"timeout": 60,
"environment": null,
"gpu": null,
"server_url": null,
"kernel_id": null,
"proxy_token": null,
"channels_url": null,
"token": null,
"run_url": null,
"python_version": null
}
}
}const result = await client.callTool("launch_sandbox", {
"sandbox_name": "string",
"variant": null,
"timeout": 60,
"environment": null,
"gpu": null,
"server_url": null,
"kernel_id": null,
"proxy_token": null,
"channels_url": null,
"token": null,
"run_url": null,
"python_version": null
});result = await session.call_tool("launch_sandbox", arguments={
"sandbox_name": "string",
"variant": null,
"timeout": 60,
"environment": null,
"gpu": null,
"server_url": null,
"kernel_id": null,
"proxy_token": null,
"channels_url": null,
"token": null,
"run_url": null,
"python_version": null
}){
"sandbox_name": "string",
"variant": null,
"timeout": 60,
"environment": null,
"gpu": null,
"server_url": null,
"kernel_id": null,
"proxy_token": null,
"channels_url": null,
"token": null,
"run_url": null,
"python_version": null
}{
"content": [
{
"type": "text",
"text": "..."
}
]
}list_sandboxes
read-onlyList launched code sandboxes that can be used as alternatives to kernels.
Returns
resultArray<object>requiredAll launched sandboxes with name, variant, status, and active flag
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "list_sandboxes",
"arguments": {}
}
}const result = await client.callTool("list_sandboxes", {});result = await session.call_tool("list_sandboxes", arguments={}){
"result": [
{}
]
}use_sandbox
destructiveSelect which launched sandbox execute_code should use instead of kernels.
Body
sandbox_namestring | nullnullSandbox name to activate for execute_code. Pass null/empty to disable sandbox routing and return to Jupyter kernels.
Returns
resultstringrequiredSandbox routing status
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "use_sandbox",
"arguments": {
"sandbox_name": null
}
}
}const result = await client.callTool("use_sandbox", {
"sandbox_name": null
});result = await session.call_tool("use_sandbox", arguments={
"sandbox_name": null
}){
"sandbox_name": null
}{
"result": "string"
}terminate_sandbox
destructiveTerminate a launched code sandbox.
Parameters
sandbox_namestringrequiredargumentSandbox name to terminate and unregister
Returns
resultstringrequiredTermination status message
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "terminate_sandbox",
"arguments": {
"sandbox_name": "string"
}
}
}const result = await client.callTool("terminate_sandbox", {
"sandbox_name": "string"
});result = await session.call_tool("terminate_sandbox", arguments={
"sandbox_name": "string"
}){
"result": "string"
}Prompts
jupyter_cite
Like @ or # in Coding IDE or CLI, cite specific cells from specified notebook and insert them into the prompt.
Parameters
promptstringrequiredargumentUser prompt for the cited cells
cell_indicesstringrequiredargumentCell indices to cite (0-based),supporting flexible range format, e.g., '0,1,2', '0-2' or '0-2,4'
notebook_namestringargumentName of the notebook to cite cells from, default (empty) to current activated notebook
Returns
Returns MCP content array (text, image, or embedded resource).
{
"jsonrpc": "2.0",
"method": "prompts/get",
"params": {
"name": "jupyter_cite",
"arguments": {
"prompt": "<prompt>",
"cell_indices": "<cell_indices>",
"notebook_name": "<notebook_name>"
}
}
}const result = await client.getPrompt("jupyter_cite", {
prompt: "<prompt>",
cell_indices: "<cell_indices>",
notebook_name: "<notebook_name>",
});result = await session.get_prompt("jupyter_cite", arguments={
"prompt": "<prompt>",
"cell_indices": "<cell_indices>",
"notebook_name": "<notebook_name>",
}){
"content": [
{
"type": "text",
"text": "..."
}
]
}