Repository navigation
A Simple Directory Mcp tool #27106
DUCKLINGS-JS
started this conversation in
Show and tell
Replies: 1 comment
|
Hey there. Thanks for sharing this. MCP extensions are incredibly powerful. We are always excited to see the community building new server protocols. Feel free to share a link to your repository so others can try it out. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Standard ls doesn't have a memory. You run diff_tree first to set a baseline.
The Power: It saves a snapshot of your tree. If you tell Gemini to "fix the project structure," you run it again afterward. Gemini then gets a clear log of every file added or removed, making it way harder for the AI to lose track of its own changes.
2.
When a project has dozens of subdirectories, a raw
ls -Rfloods the context window with junk.The Power: This produces a clean, 3-level deep ASCII tree that automatically ignores node_modules, .git, and .cache. It gives Gemini the "big picture" without wasting your tokens on irrelevant folder nesting.
3.
Creating folders and files one by one via shell is slow. I built a simple grammar into this tool:
folder>file<,next_file.The Power: You can give Gemini one instruction: "Scaffold the core modules," and it executes a single tool call to build the entire skeleton. It’s faster, less prone to syntax errors, and keeps the conversation flow clean.
Read the source code/ask Gemini what it does, If you don't understand
https://gist.github.com/DUCKLINGS-JS/171b3fa42ea1810b394c0aaf971e7a65?hl=id-ID
All reactions