Skip to main content

Definition

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

Syntax

CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.ReadToolFileInfo

Summary

Contains detailed information about a file read by the Claude Code Read tool, including its path, content, and line-related metadata.

Remarks

The content returned by the Read tool includes line numbers in a specific format: spaces followed by the line number, a tab character, and then the actual content. For example: " 1→using System;" When using the offset and limit parameters in ReadToolInput, the ReadToolFileInfo.StartLine and ReadToolFileInfo.NumLines properties will reflect the subset of lines that were actually returned, while ReadToolFileInfo.TotalLines always represents the total number of lines in the entire file.

Constructors

.ctor

Syntax

public ReadToolFileInfo()

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

Content

Gets or sets the content of the file, formatted with line numbers.

Syntax

public string Content { get; set; }

Property Value

Type: string

Examples

"     1→using System;\n     2→using System.Text.Json;\n     3→\n     4→namespace MyApp"

Remarks

The content is formatted using cat -n style output, where each line is prefixed with its line number. The format is: spaces for padding, line number, tab character (→), then the actual line content. Lines longer than 2000 characters are automatically truncated by Claude Code.

FilePath

Gets or sets the absolute path to the file that was read.

Syntax

public string FilePath { get; set; }

Property Value

Type: string

Examples

"C:\\Users\\Developer\\Projects\\MyApp\\src\\Program.cs"

Remarks

This is always an absolute path, regardless of whether the original request used a relative or absolute path. On Windows, this will use backslash separators.

NumLines

Gets or sets the number of lines included in this response.

Syntax

public int NumLines { get; set; }

Property Value

Type: int

Remarks

This value reflects the actual number of lines returned, which may be less than ReadToolFileInfo.TotalLines if the offset and limit parameters were used in the original ReadToolInput, or if the file was truncated due to size. By default, the Read tool returns up to 2000 lines.

StartLine

Gets or sets the starting line number (1-based) of the content in this response.

Syntax

public int StartLine { get; set; }

Property Value

Type: int

Remarks

Line numbers in Claude Code are 1-based, meaning the first line of a file is line 1. If an offset was specified in the ReadToolInput, this value will reflect that offset.

TotalLines

Gets or sets the total number of lines in the entire file.

Syntax

public int TotalLines { get; set; }

Property Value

Type: int

Remarks

This represents the complete line count of the file, regardless of how many lines were actually returned in this response. Use this to determine if the file was partially read (when ReadToolFileInfo.NumLines is less than ReadToolFileInfo.TotalLines).

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?