Skip to content

ReadFileInfo

Base classes

Name Children Inherits
dict
builtins
dict() -> new empty dictionary

⋔ Inheritance diagram

graph TD
  753667069["output_types.ReadFileInfo"]
  2645524081["builtins.dict"]
  2751680898["builtins.object"]
  2645524081 --> 753667069
  2751680898 --> 2645524081

🛈 DocStrings

Bases: TypedDict

Nested file info inside a Read tool result (text mode).

Source code in src/clawd_code_sdk/models/output_types.py
class ReadFileInfo(TypedDict):
    """Nested file info inside a Read tool result (text mode)."""

    filePath: str
    """The path to the file that was read."""
    content: str
    """The read content of the file."""
    numLines: int
    """The number of lines read."""
    startLine: int
    """The line number where reading started from."""
    totalLines: int
    """The total number of lines in the file."""
    # resultWasTruncated: NotRequired[bool]
    # """Whether the result was truncated due to the maximum token limit."""
    truncatedByTokenCap: NotRequired[bool]
    """True when a whole-file read was auto-paginated because it exceeded the token cap."""

content instance-attribute

content: str

The read content of the file.

filePath instance-attribute

filePath: str

The path to the file that was read.

numLines instance-attribute

numLines: int

The number of lines read.

startLine instance-attribute

startLine: int

The line number where reading started from.

totalLines instance-attribute

totalLines: int

The total number of lines in the file.

truncatedByTokenCap instance-attribute

truncatedByTokenCap: NotRequired[bool]

True when a whole-file read was auto-paginated because it exceeded the token cap.

:fa-brands-github: Show source on GitHub