LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Types
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
  • Vitest
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsnodeReadResult
Interface●Since v1.10

ReadResult

Copy
interface ReadResult

Properties

View source on GitHub
property
content: string | Uint8Array<ArrayBufferLike>

File content: string for text, Uint8Array for binary. Undefined on failure.

property
endLine: number

1-indexed last source line represented by content.

property
error: string

Error message on failure, undefined on success

property
mimeType: string

MIME type of the file, when available

property
nextOffset: number

0-indexed offset of the next unread source line. Omitted when the returned text reaches EOF.

property
startLine: number

1-indexed first source line represented by content. Text pagination fields are optional so older/custom backends remain valid.

property
totalLines: number

Total number of logical source lines for a text read, when known. Omitted for binary reads and for backends that cannot determine it.

See More

Structured result from backend read operations.

Replaces the previous plain string return, giving callers a programmatic way to distinguish errors from content.