glean-tool-selection

glean-tool-selection is a cursor rule for Cursor from gleanwork/cursor-plugins. It costs 288 tokens per session, scanned A, original, MIT.

A set of always-active rules for choosing the right Glean search tool for different questions. Glean is a company search system that can search sources such as documents, email, meetings, and code.

In plain words
What is it for?
Use it to route document, email, meeting, code, activity, people, and multi-source questions, and to ensure results include links for verification.
Why use it?
It prevents people and questions from being sent to the wrong search method, which can produce incomplete or misleading results.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to route document, email, meeting, code, activity, people, and multi-source questions, and to ensure results include links for verification.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/gleanwork/cursor-plugins/glean-tool-selection
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/gleanwork/cursor-plugins

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for glean-tool-selection

README.md
[![agentmods](https://agentmods.dev/badge/rules/gleanwork/cursor-plugins/glean-tool-selection/github.svg)](https://agentmods.dev/rules/gleanwork/cursor-plugins/glean-tool-selection)
Your own site
<a href="https://agentmods.dev/rules/gleanwork/cursor-plugins/glean-tool-selection"><img src="https://agentmods.dev/badge/rules/gleanwork/cursor-plugins/glean-tool-selection/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for glean-tool-selection

Your own site · 80×15
<a href="https://agentmods.dev/rules/gleanwork/cursor-plugins/glean-tool-selection"><img src="https://agentmods.dev/badge/rules/gleanwork/cursor-plugins/glean-tool-selection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 288 This file is loaded in full into every session.
When invoked 288 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00288 $0.00288
Opus 5.5 $0.00115 $0.00115
Sonnet 5.5 $0.00058 $0.00058
Haiku 4.5 $0.00029 $0.00029

Measured 1mo ago against content hash a5d611f54039, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

glean-tool-selection scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

glean/rules/glean-tool-selection.mdc · 24 lines

What it actually says

Glean Tool Selection

When Glean MCP tools are available (tools matching mcp__glean_*), use the correct tool for each query type:

  • People queries ("who works on", "who owns", org chart) → employee_search (NEVER use search for people)
  • Meeting queries (decisions, action items, transcripts) → meeting_lookup with natural language dates
  • Email queries (messages, attachments) → gmail_search
  • Code queries (implementations, patterns, commits) → code_search
  • Activity queries ("what have I done", standup prep) → user_activity
  • Document queries (policies, specs, wikis) → search
  • Full document content → read_document with URL from search results
  • Complex multi-source analysis → chat

Key rules:

  • Use search with structured parameters (separate owner, app, updated arguments)
  • Use code_search, employee_search, gmail_search with inline query filters
  • Use meeting_lookup with natural language dates (inline date filters are unreliable)
  • Always cite sources with URLs so users can verify
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 24 lines · 288 tokens per session scan A a5d611f54039

Subscribe to this mod's changes

glean-tool-selection is a cursor rule published in the GitHub repository gleanwork/cursor-plugins (4 stars, last pushed 17d ago), licensed MIT. It adds 288 tokens to every session, about $0.0012 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.