Skip to main content

Definition

Assembly: CloudNimble.ClaudeEssentials.dll Namespace: CloudNimble.ClaudeEssentials.Hooks.Tools.Responses Inheritance: System.Object

Syntax

Summary

Represents the response payload returned by the Claude Code NotebookEdit tool after modifying a Jupyter notebook cell.

Remarks

The NotebookEdit tool modifies Jupyter notebook (.ipynb) files by replacing, inserting, or deleting cells. Jupyter notebooks are interactive documents that combine code, text, and visualizations, commonly used for data analysis and scientific computing. This response is received in the NotebookEditPostToolUsePayload when the tool_name is “NotebookEdit”. Supported edit operations:
  • replace - Replaces the content of an existing cell
  • insert - Adds a new cell at a specified position
  • delete - Removes a cell from the notebook
Example JSON payload:
Unlike most other tool responses which use camelCase property names, NotebookEdit uses snake_case for all properties in both its input and output payloads.

Constructors

.ctor

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

CellId

Gets or sets the identifier of the cell that was edited, inserted, or deleted.

Syntax

Property Value

Type: string?

Remarks

Cell IDs are unique identifiers within a notebook that persist across edits. For insert operations, this is the ID of the newly created cell. For delete operations, this is the ID of the cell that was removed. May be null if the operation did not involve a specific cell or if the cell was identified by index rather than ID.

CellType

Gets or sets the type of the cell.

Syntax

Property Value

Type: System.Nullable<CloudNimble.ClaudeEssentials.Hooks.NotebookCellType?>?

Remarks

See NotebookCellType for possible values.

EditMode

Gets or sets the type of edit operation that was performed.

Syntax

Property Value

Type: System.Nullable<CloudNimble.ClaudeEssentials.Hooks.NotebookEditMode?>?

Remarks

See NotebookEditMode for possible values. This should match the NotebookEditToolInput.EditMode that was specified in the input, defaulting to NotebookEditMode.Replace if not specified.

Error

Gets or sets the error message if the operation failed.

Syntax

Property Value

Type: string?

Language

Gets or sets the programming language of the notebook.

Syntax

Property Value

Type: string?

NewSource

Gets or sets the new source code that was written to the cell.

Syntax

Property Value

Type: string?

NotebookPath

Gets or sets the absolute path to the Jupyter notebook that was edited.

Syntax

Property Value

Type: string

Examples

Remarks

This is always an absolute path, regardless of whether the original request used a relative or absolute path. The file extension will be .ipynb.

OriginalFile

Gets or sets the original notebook content before modification.

Syntax

Property Value

Type: string?

Success

Gets or sets a value indicating whether the notebook edit was successful.

Syntax

Property Value

Type: bool

Remarks

When true, the notebook was successfully modified and saved. When false, the edit operation failed. Common failure reasons include:
  • The specified cell ID or index does not exist
  • The notebook file could not be written (permissions, disk space)
  • The notebook format is invalid or corrupted
  • Required parameters were missing or invalid

UpdatedFile

Gets or sets the updated notebook content after modification.

Syntax

Property Value

Type: string?

Methods

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?