Entropic 2.11.1
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::ListDirectoryTool Class Reference

Tool for listing directory contents. More...

Inheritance diagram for entropic::ListDirectoryTool:
Collaboration diagram for entropic::ListDirectoryTool:

Public Member Functions

 ListDirectoryTool (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
 List directory entries with optional recursion.
 
- 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 ToolDefinitiondefinition () const
 Get the full tool definition.
 
virtual std::string anchor_key (const std::string &args_json) const
 Generate anchor key for this tool result.
 

Additional Inherited Members

- Protected Attributes inherited from entropic::ToolBase
ToolDefinition definition_
 Tool definition.
 

Detailed Description

Tool for listing directory contents.

@dg_internal

Version
1.8.5

Definition at line 1318 of file filesystem.cpp.

Constructor & Destructor Documentation

◆ ListDirectoryTool()

entropic::ListDirectoryTool::ListDirectoryTool ( FilesystemServer server,
const std::string &  data_dir 
)
inline

Construct from server reference and data directory.

Parameters
serverOwning filesystem server.
data_dirPath to bundled data directory. @dg_internal
Version
1.8.5

Definition at line 1327 of file filesystem.cpp.

Member Function Documentation

◆ execute()

ServerResponse entropic::ListDirectoryTool::execute ( const std::string &  args_json)
overridevirtual

List directory entries with optional recursion.

Execute list_directory: list entries in a directory.

Parameters
args_jsonJSON with "path" and optional depth params.
Returns
ServerResponse with directory listing. @dg_internal
Version
1.8.5

The optional parameters carry documented defaults (gh#116): path defaults to the project root, recursive to false, max_depth to 3.

Parameters
args_jsonJSON with optional "path", "recursive" and "max_depth" keys — all three may be omitted.
Returns
A ServerResponse with no directives whose result is the JSON array of entries, or a structured not_directory error when the resolved path is not a directory. @req REQ-MCP-021
Version
2.9.13

Implements entropic::ToolBase.

Definition at line 1372 of file filesystem.cpp.

◆ required_access_level()

MCPAccessLevel entropic::ListDirectoryTool::required_access_level ( ) const
inlineoverridevirtual

Read-only tool — requires READ access.

Returns
MCPAccessLevel::READ, relaxing ToolBase's WRITE default because this tool only inspects the workspace. @req REQ-MCP-011
Version
1.9.4

Reimplemented from entropic::ToolBase.

Definition at line 1341 of file filesystem.cpp.


The documentation for this class was generated from the following file: