ReadFileTool class

Reads a local file and returns its text content.

Inheritance

Constructors

ReadFileTool({String? allowedDirectory, ConsciousnessLogger? logger})

Properties

allowedDirectory → String?
If set, only files within this directory may be read.
final
description → String
One-sentence description included in the system prompt.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
inputSchema → Map<String, String>
Schema of expected input keys and their descriptions.
no setteroverride
isIdempotent → bool
Whether this tool can safely be retried on failure.
no setterinherited
name → String
Unique snake_case name the LLM uses to invoke this tool.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(Map<String, dynamic> input) → Future<ToolResult>
Executes the tool with the given input map.
override
toString() → String
A string representation of this object.
inherited
validate(Map<String, dynamic> input) → String?
Validates the input map against inputSchema.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited