# Glob Pattern Tester MCP for AI Agents AI Agent Connect

> Glob Pattern Tester lets you verify if a file path matches a glob pattern using the exact engine used by npm and git. It handles complex rules like negations, brackets, and recursive wildcards. With over 130M weekly downloads for the underlying library, this is the definitive way to validate your .gitignore and CI configuration rules.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_qLLsWj4WeWzoDmQVDxXbNpJEtfjpeUWDKsrWoAhW/ai-agent-connect
- **Tags:** pattern-matching, file-system, automation, regex, path-validation, devops-utilities

## Description

When you write .gitignore rules or CI pipeline includes, it is easy to guess wrong. You might think a pattern like src/**/*.ts covers every file, only to find out later that a specific path is being skipped or included by mistake. This Connector gives you the definitive answer. It uses the same engine used by npm and git to evaluate glob patterns deterministically. Instead of manually checking folders or running a build to see what fails, you can just ask your agent to check the logic. It's a small but vital tool if you need to make sure your file filtering is actually working. You can find this and thousands of other specialized tools in the Vinkius catalog to keep your dev environment precise. It handles the standard wildcards you use every day, plus more complex logic like negations and brace expansions.

## Tools

### test_glob
Check if a file path matches a glob pattern. Use this to verify that your .gitignore or CI rules behave exactly as you expect.

## Prompt Examples

**Prompt:** 
```
Does the pattern src/**/*.ts match the file src/utils/helper.ts?
```

**Response:** 
```
Glob Match Result: matches = true
```

**Prompt:** 
```
Check if *.json matches package.json in the root.
```

**Response:** 
```
Glob Match Result: matches = true
```

**Prompt:** 
```
Will !dist/** exclude the file dist/bundle.js?
```

**Response:** 
```
Glob Match Result: matches = false (negated)
```

## Capabilities

### Validate .gitignore rules
Check if your exclusion rules are actually catching the files you want to ignore.

### Check CI include patterns
Verify that your pipeline only picks up the files you intended.

### Test deploy filters
Ensure your production build filters are working as expected.

### Evaluate recursive wildcards
Confirm that double asterisks are reaching the correct subdirectories.

### Verify negation logic
Check if exclamation marks are correctly excluding specific paths.

### Confirm brace expansion matches
Validate that multiple path options in a single rule are being handled correctly.

## Use Cases

### Verifying .gitignore rules
A developer wants to make sure their .gitignore is actually ignoring a large data folder. They use the tool to test the path and confirm the rule works.

### Debugging CI build failures
A CI/CD specialist needs to know if a deployment filter is grabbing the right assets. They use the tool to verify the rule logic instantly.

### Validating recursive wildcards
A DevOps engineer is unsure if src/**/*.ts will catch a file in a deeply nested folder. They ask the agent to check the path.

### Checking deployment filters
A team is setting up a new build pipeline and needs to confirm that only the production assets are being bundled.

## Benefits

- Stop guessing if a pattern works by using test_glob to get a definitive true or false result immediately.
- Prevent broken builds by validating CI include patterns with test_glob before you push your code.
- Manage complex exclusions like !dist/** more reliably using the test_glob tool.
- Align your project rules with industry standards because test_glob uses the same engine as npm and git.
- Save time on manual folder audits by letting your agent verify dozens of paths in seconds using test_glob.

## How It Works

The bottom line is you get a binary match result based on the exact same logic used by the most popular package managers and version control systems.

1. Input the glob pattern you want to test.
2. Provide the specific file path to check against that pattern.
3. Receive a clear true or false result.

## Frequently Asked Questions

**How can I use the Glob Pattern Tester MCP to check my .gitignore rules?**
You can ask your agent to check specific file paths against your .gitignore patterns. It will tell you exactly which files are being ignored based on the same logic npm uses.

**Does the Glob Pattern Tester MCP support recursive wildcards like **?**
Yes, it fully supports recursive wildcards, negations, and brace expansions, making it perfect for complex file filtering.

**Can I use the Glob Pattern Tester MCP to verify CI include patterns?**
Absolutely. You can provide your CI include or exclude patterns to see which files will be picked up by your pipeline before you run it.

**Will the Glob Pattern Tester MCP give me the same results as npm?**
Yes, it uses the minimatch engine, which is the standard library for glob patterns used by both npm and git.

**How does the Glob Pattern Tester MCP handle negated patterns like !?**
It handles negations perfectly. You can test rules like !dist/** to see exactly what is being excluded from your match.

**Can I check multiple file paths against one glob pattern with the Glob Pattern Tester MCP?**
You can check paths one by one or ask your agent to check a list of paths against a single pattern to verify your rules.

**Is this the same algorithm git uses?**
Yes. minimatch is the glob engine used by npm itself and follows the same POSIX glob specification that git uses for .gitignore.

**Does it support double-star recursive patterns?**
Yes. The `**` pattern matches any number of directories recursively. For example, `src/**/*.ts` matches files at any depth inside `src/`.

**Can I test negation patterns?**
Yes. Prefix any pattern with `!` to negate it. For example, `!node_modules/**` will NOT match any path inside node_modules.