Skip to content
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

feat(directory_tree): add excludePatterns support & documentation #623

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lamemind
Copy link
Contributor

@lamemind lamemind commented Feb 13, 2025

  • Update documentation with directory_tree declaration
  • Add excludePatterns parameter to DirectoryTreeArgsSchema
  • Implement pattern exclusion in buildTree function using minimatch
  • Pass excludePatterns through recursive calls
  • Support both simple and glob patterns for exclusion
  • Maintain consistent behavior with search_files implementation

Description

Motivation and Context

launching directory_tree inside a code project is a pain. adding exclusion pattern is my solution.

How Has This Been Tested?

Tested locally

Breaking Changes

No breaking changes. excludePatterns is empty by default.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

- Update documentation with directory_tree declaration
- Add excludePatterns parameter to DirectoryTreeArgsSchema
- Implement pattern exclusion in buildTree function using minimatch
- Pass excludePatterns through recursive calls
- Support both simple and glob patterns for exclusion
- Maintain consistent behavior with search_files implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant