Skip to main content
Glama

execute_code

Execute code directly in Jupyter notebooks for debugging, profiling, and temporary calculations without saving to the notebook.

Instructions

Execute code directly in the kernel (not saved to notebook) on the current activated notebook.

Recommended to use in following cases: 1. Execute Jupyter magic commands(e.g., `%timeit`, `%pip install xxx`) 2. Performance profiling and debugging. 3. View intermediate variable values(e.g., `print(xxx)`, `df.head()`) 4. Temporary calculations and quick tests(e.g., `np.mean(df['xxx'])`) 5. Execute Shell commands in Jupyter server(e.g., `!git xxx`) Under no circumstances should you use this tool to: 1. Import new modules or perform variable assignments that affect subsequent Notebook execution 2. Execute dangerous code that may harm the Jupyter server or the user's data without permission

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCode to execute (supports magic commands with %, shell commands with !)
timeoutNoExecution timeout in seconds

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/datalayer/jupyter-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server