-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FileSystem] directory_tree base implementation #213
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tool results are meant for consumption by the model, rather than the end user. I'm not sure this visualization will help the model, compared to more structured forms of information (e.g., JSON or XML).
Can you share more about the use case you have in mind?
Hello @jspahrsummers , I didn't focus on the use cases. Anyway, I can change the implementation as you prefer. Thanks |
I think the
Arguably, even a bulleted list with nesting would probably work better. Can you update to one of those, and we can get this merged? |
@jspahrsummers it's done. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you!
[FileSystem] directory_tree base implementation
Description
Add directory_tree function to filesystem server to provide hierarchical visualization of directory structures. This provides a clear, formatted tree view with ASCII characters for structure and distinguishes between files and directories with [F] and [D] prefixes.
Server Details
Motivation and Context
The existing list_directory function only shows contents of a single directory level. When analyzing project structures or complex directory hierarchies, users need a recursive view of the entire directory tree. This addition allows LLMs to quickly understand and reason about complete directory structures in a single query.
Breaking Changes
No breaking changes. Adds new functionality while maintaining existing behavior.
Types of changes
Checklist
Additional context
Implementation follows similar pattern to list_directory:
Example output: