Skip to content

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
@cantino
Copy link

cantino commented Mar 18, 2025

I'd really like to see excludePatterns added.

@olaservo olaservo added server-filesystem Reference implementation for the Filesystem MCP server - src/filesystem enhancement New feature or request labels Mar 27, 2025
domdomegg
domdomegg previously approved these changes Aug 15, 2025
pcarleton
pcarleton previously approved these changes Aug 18, 2025
@domdomegg domdomegg dismissed stale reviews from pcarleton and themself via 59ae3e0 August 23, 2025 06:17
@domdomegg domdomegg merged commit d381cf1 into modelcontextprotocol:main Aug 23, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request server-filesystem Reference implementation for the Filesystem MCP server - src/filesystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants