Skip to main content
Glama

move_cell

Destructive

Relocate a notebook cell to a new position, shifting other cells automatically while preserving cell content and metadata.

Instructions

Move 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_indexYesIndex of the cell to move (0-based)
target_indexYesDestination index where the cell will end up (0-based)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesSuccess message with moved cell info and surrounding context
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Description details the removal, placement, and shifting of cells, and states that cell type, source, and outputs are preserved. It also notes atomicity. Annotations already include destructiveHint=true, and the description adds context beyond that without contradicting it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two clear paragraphs: first explains the operation with an example, second provides usage guidance. Every sentence adds value, no redundancy, and the most important info is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With simple integer parameters, a clear schema, and an output schema, the description adequately explains the tool's behavior. It would benefit from mentioning error cases (e.g., out-of-bounds indices) but is complete for typical use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with clear descriptions for both parameters. The description reinforces these by providing an example and explaining the shifting behavior. The example adds practical meaning beyond the schema definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Move a cell from source_index to target_index within the currently activated notebook' with a specific verb-resource pair. Provides an example that clarifies the operation, and the name and description distinguish it from sibling tools like insert_cell, delete_cell, etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises using this tool over manual delete and re-insert for atomicity and metadata preservation. Also suggests using read_notebook first to see indices. However, it does not explicitly mention when not to use it or compare with direct sibling alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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