|
Entropic 2.11.1
Local-first agentic inference engine
|
Tool for reading file contents with line numbering. More...


Public Member Functions | |
| ReadFileTool (FilesystemServer &server, const std::string &data_dir) | |
| Construct from server reference and data directory. | |
| MCPAccessLevel | required_access_level () const override |
| Read-only tool — requires READ access. | |
| ServerResponse | execute (const std::string &args_json) override |
| Read a file and return numbered lines as JSON. | |
| std::string | anchor_key (const std::string &args_json) const override |
| Anchor key for context deduplication. | |
Public Member Functions inherited from entropic::ToolBase | |
| ToolBase (ToolDefinition def) | |
| Construct with a pre-built definition. | |
| const std::string & | name () const |
| Get the tool name. | |
| const ToolDefinition & | definition () const |
| Get the full tool definition. | |
Additional Inherited Members | |
Protected Attributes inherited from entropic::ToolBase | |
| ToolDefinition | definition_ |
| Tool definition. | |
Tool for reading file contents with line numbering.
@dg_internal
Definition at line 803 of file filesystem.cpp.
|
inline |
Construct from server reference and data directory.
| server | Owning filesystem server. |
| data_dir | Path to bundled data directory. @dg_internal |
Definition at line 812 of file filesystem.cpp.
|
inlineoverridevirtual |
Anchor key for context deduplication.
A non-empty key is what makes MCPServerBase auto-inject the context_anchor directive for this tool.
| args_json | JSON with "path" key. |
Reimplemented from entropic::ToolBase.
Definition at line 851 of file filesystem.cpp.
|
overridevirtual |
Read a file and return numbered lines as JSON.
Execute read_file: resolve, gate, read, hash, track.
| args_json | JSON with "path" key. |
Issue #15 (v2.1.4): pre-read gating moved into check_read_gates so the ignore-matcher refusal lives next to existence + size checks.
A successful read records the content hash in the FileAccessTracker — which is why read_file must always execute and opts out of duplicate detection.
| args_json | JSON with a "path" key. |
Implements entropic::ToolBase.
Definition at line 939 of file filesystem.cpp.
|
inlineoverridevirtual |
Read-only tool — requires READ access.
Reimplemented from entropic::ToolBase.
Definition at line 826 of file filesystem.cpp.