# Glob-scoped rules should trigger on AI file access, not just editor tabs — plus MCP/CLI tool triggers

**URL:** <https://forum.cursor.com/t/glob-scoped-rules-should-trigger-on-ai-file-access-not-just-editor-tabs-plus-mcp-cli-tool-triggers/156553>\
**Category:** Feature Requests\
**Tags:** mcp, context, rules\
**Created:** [April 3, 2026, 12:58am UTC](https://forum.cursor.com/t/glob-scoped-rules-should-trigger-on-ai-file-access-not-just-editor-tabs-plus-mcp-cli-tool-triggers/156553 "2026-04-03T00:58:01Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![WD4Ever](https://avatars.discourse-cdn.com/v4/letter/w/49beb7/32.png) [@WD4Ever](https://forum.cursor.com/u/WD4Ever)\
**Post date:** [April 10, 2026, 2:39pm UTC](https://forum.cursor.com/t/glob-scoped-rules-should-trigger-on-ai-file-access-not-just-editor-tabs-plus-mcp-cli-tool-triggers/156553/9 "2026-04-10T14:39:01Z")

</div>

> [@Colin](#):
>
> This one’s on me – there should be no quotes around `" **/database/**"`. I’ve edited my last response.
> 
> ```auto
> globs: **/database/**
> 
> ```
> 
> Having files open in the editor should not influence rule execution. The agent is aware of what files have been opened recently, but that doesn’t influence rule execution.

Thanks for the correction — removing the quotes fixed it. We tested all three syntax variants:

- `globs: **/database/** ` (no quotes) — \*\*works\*\*

- `globs: “ **/database/** ”` (quoted string) — does not work

- `globs:` with `- “ **/database/** ”` (YAML list) — does not work

We also confirmed that having a matching file open in an editor tab without the agent reading it does \*\*not\*\* trigger the rule, which matches what you described.

One issue we did find: glob rules created mid-conversation don’t take effect until you open a new chat. We created the test rule, had the agent read a matching file in the same chat, and the rule never injected. Opening a fresh chat and having the agent read the same file worked immediately. This could be confusing if someone creates a new glob rule and expects it to apply right away — it silently doesn’t until the next chat.

The syntax sensitivity is worth calling out in the docs. The YAML list format (`- “pattern”`) and quoted strings (`“pattern”`) are both natural things to write and both silently fail. A validation warning when a glob pattern contains quotes or brackets would save people a lot of debugging.

Thanks for the quick responses.

---

_[View the full topic](https://forum.cursor.com/t/glob-scoped-rules-should-trigger-on-ai-file-access-not-just-editor-tabs-plus-mcp-cli-tool-triggers/156553)._
