glean-tools-guide

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Glean Tools Selection Guide

Glean工具选择指南

This skill provides guidance on selecting and using Glean MCP tools effectively.
本技能为有效选择和使用Glean MCP工具提供指导。

Skills vs Agents vs Commands

Skills、Agents与Commands对比

This plugin uses three component types:
  • Skills (like this one): Auto-triggered guidance that helps Claude select the right tools
  • Agents (e.g.,
    enterprise-searcher
    ): Autonomous workers spawned for complex multi-step tasks
  • Commands (e.g.,
    /glean-search:search
    ): User-triggered structured workflows
Skills provide knowledge; agents do work; commands orchestrate workflows.
本插件使用三种组件类型:
  • Skills(如本技能):自动触发的指南,帮助Claude选择合适的工具
  • Agents(例如
    enterprise-searcher
    ):为复杂多步骤任务而生的自主工作单元
  • Commands(例如
    /glean-search:search
    ):用户触发的结构化工作流
Skills提供知识;Agents执行任务;Commands编排工作流。

Tool Naming Convention

工具命名规范

Glean MCP tools follow the pattern:
mcp__glean_[server-name]__[tool]
Where
[server-name]
is dynamic and configured per user (e.g.,
default
,
production
,
acme
). The tool suffix is always consistent. When invoking tools, use whatever Glean server is available in your tool list.
Glean MCP工具遵循以下命名模式:
mcp__glean_[server-name]__[tool]
其中
[server-name]
是动态的,会根据用户配置而变化(例如
default
production
acme
)。工具后缀始终保持一致。调用工具时,请使用工具列表中可用的任意Glean服务器。

Available Tools Overview

可用工具概览

Tool SuffixPurposeUse When
search
Document discoveryFinding docs, wikis, policies, specs
employee_search
People lookupFinding people, org chart, teams
meeting_lookup
Meeting searchFinding meetings, transcripts, decisions
gmail_search
Email searchFinding emails, attachments
code_search
Code discoveryFinding internal code, commits
user_activity
Activity feedFinding your recent actions and interactions
read_document
Full contentReading complete document by URL
chat
AI synthesisComplex analysis across sources
工具后缀用途使用场景
search
文档查找查找文档、维基、政策、规范
employee_search
人员查询查找人员、组织架构、团队
meeting_lookup
会议搜索查找会议、会议记录、决策内容
gmail_search
邮件搜索查找邮件、附件
code_search
代码查找查找内部代码、提交记录
user_activity
活动流查找你近期的操作和交互记录
read_document
完整内容读取通过URL读取文档完整内容
chat
AI综合分析跨来源的复杂分析

Tool Selection Decision Tree

工具选择决策树

User question about...
├── People, "who", org chart → employee_search
├── Meetings, decisions, action items → meeting_lookup
├── Emails, attachments → gmail_search
├── Internal code, commits → code_search
├── "My activity", "what have I done", recent actions → user_activity
├── Documents, policies, specs → search
├── Need full document content → read_document (with URL)
└── Complex multi-source analysis → chat
用户问题涉及...
├── 人员、"谁"、组织架构 → employee_search
├── 会议、决策、行动项 → meeting_lookup
├── 邮件、附件 → gmail_search
├── 内部代码、提交记录 → code_search
├── "我的活动"、"我做过什么"、近期操作 → user_activity
├── 文档、政策、规范 → search
├── 需要文档完整内容 → read_document(需提供URL)
└── 跨多来源的复杂分析 → chat

Critical Rules

关键规则

1. Never Use Regular Search for People

1. 切勿使用常规搜索查找人员

undefined
undefined

WRONG

错误示例

search "John Smith"
search "John Smith"

CORRECT

正确示例

employee_search "John Smith"
undefined
employee_search "John Smith"
undefined

2. Search → Read Workflow

2. 搜索→读取工作流

When users need document details:
  1. First:
    search
    to find documents
  2. Then:
    read_document
    with URL from results
当用户需要文档详情时:
  1. 第一步:使用
    search
    查找文档
  2. 第二步:使用
    read_document
    并传入搜索结果中的URL

3. Use Chat for Synthesis

3. 使用Chat进行综合分析

When the question requires reasoning across multiple sources:
chat "What are our authentication best practices based on recent RFCs and security policies?"
当问题需要跨多个来源进行推理时:
chat "根据近期RFC和安全政策,我们的身份验证最佳实践是什么?"

Query Filter Reference

查询过滤器参考

Document Search (search) - Structured Parameters

文档搜索(search)- 结构化参数

The
search
tool uses separate parameters (not inline query filters):
ParameterTypeDescription
query
stringKeywords to find documents (required)
owner
stringFilter by document creator (
"person name"
,
"me"
,
"myteam"
)
from
stringFilter by who updated/commented/created (
"person name"
,
"me"
,
"myteam"
)
updated
stringFilter by update date (
today
,
yesterday
,
past_week
,
past_2_weeks
,
past_month
, or month name)
after
stringDocuments created after date (
YYYY-MM-DD
format, no future dates)
before
stringDocuments created before date (
YYYY-MM-DD
format)
app
enumFilter by datasource (e.g.,
confluence
,
github
,
gdrive
,
slack
,
jira
,
notion
)
type
enumFilter by type:
pull
,
spreadsheet
,
slides
,
email
,
direct message
,
folder
channel
stringFilter by Slack channel name
exhaustive
booleanReturn all matching results (use for "all", "each", "every" requests)
sort_by_recency
booleanSort by newest first (only when user wants "latest" or "most recent")
search
工具使用独立参数(而非内联查询过滤器):
参数类型说明
query
字符串用于查找文档的关键词(必填)
owner
字符串按文档创建者过滤(支持
"人员姓名"
"me"
"myteam"
from
字符串按更新/评论/创建者过滤(支持
"人员姓名"
"me"
"myteam"
updated
字符串按更新日期过滤(支持
today
yesterday
past_week
past_2_weeks
past_month
或月份名称)
after
字符串按创建日期过滤(仅支持晚于指定日期,格式为
YYYY-MM-DD
,不可使用未来日期)
before
字符串按创建日期过滤(仅支持早于指定日期,格式为
YYYY-MM-DD
app
枚举值按数据源过滤(例如
confluence
github
gdrive
slack
jira
notion
type
枚举值按类型过滤:
pull
spreadsheet
slides
email
direct message
folder
channel
字符串按Slack频道名称过滤
exhaustive
布尔值返回所有匹配结果(适用于需要"全部"、"每个"结果的请求)
sort_by_recency
布尔值按最新排序(仅当用户需要"最新"或"最近"内容时使用)

Code Search Filters (code_search) - Inline Query Syntax

代码搜索过滤器(code_search)- 内联查询语法

Code search uses inline filters in the query string:
Person Filters:
  • owner:"person name"
    or
    owner:me
    - Filter by commit creator
  • from:"person name"
    or
    from:me
    - Filter by code file/commit updater
Date Filters:
  • updated:today|yesterday|past_week|past_month
    - Filter by update date
  • after:YYYY-MM-DD
    - Commits/files changed after date
  • before:YYYY-MM-DD
    - Commits/files changed before date
代码搜索使用查询字符串中的内联过滤器
人员过滤器:
  • owner:"person name"
    owner:me
    - 按提交创建者过滤
  • from:"person name"
    from:me
    - 按代码文件/提交更新者过滤
日期过滤器:
  • updated:today|yesterday|past_week|past_month
    - 按更新日期过滤
  • after:YYYY-MM-DD
    - 按晚于指定日期的提交/文件过滤
  • before:YYYY-MM-DD
    - 按早于指定日期的提交/文件过滤

Employee Search Filters (employee_search) - Inline Query Syntax

人员搜索过滤器(employee_search)- 内联查询语法

  • reportsto:"manager name"
    - Find direct reports (NOT for finding who someone reports to)
  • startafter:YYYY-MM-DD
    - People who started after date
  • startbefore:YYYY-MM-DD
    - People who started before date
  • roletype:"individual contributor"|"manager"
    - Filter by role type
  • sortby:hire_date_ascending|hire_date_descending|most_reports
    - Sort results
  • reportsto:"manager name"
    - 查找直接下属(不适用于查找某人的上级)
  • startafter:YYYY-MM-DD
    - 查找入职时间晚于指定日期的人员
  • startbefore:YYYY-MM-DD
    - 查找入职时间早于指定日期的人员
  • roletype:"individual contributor"|"manager"
    - 按角色类型过滤
  • sortby:hire_date_ascending|hire_date_descending|most_reports
    - 结果排序方式

Meeting Lookup Filters (meeting_lookup) - Inline Query Syntax

会议查询过滤器(meeting_lookup)- 内联查询语法

Important: meeting_lookup works best with natural language queries. Date filter syntax does NOT work reliably.
Natural language dates (recommended):
  • "standup last week" - Meetings from last week
  • "design review past 2 weeks" - Recent meetings
  • "1:1 with John tomorrow" - Future meetings
  • "team sync yesterday" - Yesterday's meetings
Other filters that work:
  • participants:"name"
    - Filter by attendees
  • topic:"subject"
    - Filter by meeting subject/title
  • extract_transcript:"true"
    - Include meeting content/transcript
Note: Inline date filters (
after:
,
before:
) do not work reliably with meeting_lookup. Use natural language dates instead.
重要提示: meeting_lookup搭配自然语言查询效果最佳。日期过滤器语法的可靠性较低。
推荐使用自然语言日期:
  • "standup last week" - 上周的站会
  • "design review past 2 weeks" - 近两周的设计评审会
  • "1:1 with John tomorrow" - 明天与John的一对一会议
  • "team sync yesterday" - 昨天的团队同步会
其他可用过滤器:
  • participants:"name"
    - 按参会者过滤
  • topic:"subject"
    - 按会议主题/标题过滤
  • extract_transcript:"true"
    - 包含会议内容/记录
注意: 内联日期过滤器(
after:
before:
)在meeting_lookup中可靠性较低,请使用自然语言日期替代。

Gmail Search Filters (gmail_search) - Inline Query Syntax

Gmail搜索过滤器(gmail_search)- 内联查询语法

  • from:"person"|"email@domain.com"|"me"
    - Filter by sender
  • to:"person"|"email@domain.com"|"me"
    - Filter by recipient
  • subject:"text"
    - Filter by subject line
  • has:attachment|document|spreadsheet|presentation
    - Filter by attachment type
  • is:important|starred|read|unread|snoozed
    - Filter by email status
  • label:INBOX|SENT|TRASH|DRAFT|SPAM
    - Filter by folder/label
  • after:YYYY-MM-DD
    /
    before:YYYY-MM-DD
    - Date range
  • from:"person"|"email@domain.com"|"me"
    - 按发件人过滤
  • to:"person"|"email@domain.com"|"me"
    - 按收件人过滤
  • subject:"text"
    - 按主题行过滤
  • has:attachment|document|spreadsheet|presentation
    - 按附件类型过滤
  • is:important|starred|read|unread|snoozed
    - 按邮件状态过滤
  • label:INBOX|SENT|TRASH|DRAFT|SPAM
    - 按文件夹/标签过滤
  • after:YYYY-MM-DD
    /
    before:YYYY-MM-DD
    - 按日期范围过滤

User Activity Parameters (user_activity)

用户活动参数(user_activity)

The
user_activity
tool uses date range parameters (not query filters):
  • start_date
    - Start date in YYYY-MM-DD format (inclusive, required)
  • end_date
    - End date in YYYY-MM-DD format (exclusive, required)
Use for: standup notes, weekly summaries, 1:1 prep, finding documents you touched but forgot.
user_activity
工具使用日期范围参数(而非查询过滤器):
  • start_date
    - 开始日期,格式为YYYY-MM-DD(包含该日期,必填)
  • end_date
    - 结束日期,格式为YYYY-MM-DD(不包含该日期,必填)
适用场景:站会记录、每周总结、一对一会议准备、查找你曾接触但遗忘的文档。

Example Tool Calls

工具调用示例

These examples show the correct syntax for each tool type.
以下示例展示了各工具的正确语法。

Search (Structured Parameters)

搜索(结构化参数)

Pass filters as separate parameters, not in the query string:
search(query="authentication RFC", app="confluence", updated="past_month")
search(query="API design", owner="me", sort_by_recency=true)
search(query="onboarding guide", from="John Smith", after="2024-01-01")
将过滤器作为独立参数传递,而非包含在查询字符串中:
search(query="authentication RFC", app="confluence", updated="past_month")
search(query="API design", owner="me", sort_by_recency=true)
search(query="onboarding guide", from="John Smith", after="2024-01-01")

Code Search (Inline Filters)

代码搜索(内联过滤器)

Include filters directly in the query string:
code_search("authentication handler owner:me updated:past_week")
code_search("payment processor after:2024-06-01 before:2024-12-01")
code_search("API endpoint from:\"Jane Doe\"")
将过滤器直接包含在查询字符串中:
code_search("authentication handler owner:me updated:past_week")
code_search("payment processor after:2024-06-01 before:2024-12-01")
code_search("API endpoint from:\"Jane Doe\"")

Employee Search (Inline Filters)

人员搜索(内联过滤器)

Include filters directly in the query string:
employee_search("engineering manager reportsto:\"VP Engineering\"")
employee_search("backend engineer startafter:2024-01-01")
employee_search("data scientist roletype:\"individual contributor\"")
将过滤器直接包含在查询字符串中:
employee_search("engineering manager reportsto:\"VP Engineering\"")
employee_search("backend engineer startafter:2024-01-01")
employee_search("data scientist roletype:\"individual contributor\"")

Meeting Lookup (Natural Language + Inline Filters)

会议查询(自然语言+内联过滤器)

Use natural language for dates; inline filters for other criteria:
meeting_lookup("my meetings today extract_transcript:\"true\"")
meeting_lookup("standup last week participants:\"John Smith\"")
meeting_lookup("design review past 2 weeks topic:\"architecture\"")
Note: Date filters (
after:
,
before:
) are documented but don't work reliably in practice. Use natural language dates instead ("today", "yesterday", "last week", "past 2 weeks").
日期使用自然语言,其他条件使用内联过滤器:
meeting_lookup("my meetings today extract_transcript:\"true\"")
meeting_lookup("standup last week participants:\"John Smith\"")
meeting_lookup("design review past 2 weeks topic:\"architecture\"")
注意:日期过滤器(
after:
before:
)在文档中有记录,但实际使用时可靠性较低。请使用自然语言日期替代(如"today"、"yesterday"、"last week"、"past 2 weeks")。

User Activity (Structured Parameters)

用户活动(结构化参数)

Pass date range as separate parameters:
user_activity(start_date="2024-01-08", end_date="2024-01-15")
将日期范围作为独立参数传递:
user_activity(start_date="2024-01-08", end_date="2024-01-15")

Filter Best Practices

过滤器最佳实践

Structured vs Inline Filters:
  • search
    uses structured parameters - pass filters as separate tool arguments
  • code_search
    ,
    employee_search
    ,
    gmail_search
    ,
    meeting_lookup
    use inline filters in the query string
When to Use Date Filters:
  • Use
    updated:
    for relative timeframes ("last week", "past month")
  • Use
    after:
    /
    before:
    for date ranges ("between Jan and March", "since 2024")
  • Avoid date filters for "latest" or "recent" without specific timeframe
  • For
    meeting_lookup
    , prefer natural language dates over inline filters
Person Filter Guidelines:
  • Use quotes for multi-word names:
    from:"John Smith"
  • Use
    owner:
    for document creators,
    from:
    for broader involvement
  • Use
    me
    when user refers to themselves
Search Strategy:
  • Start broad, then narrow with filters if too many results
  • For
    search
    : add filter parameters to narrow results
  • For other tools: add inline filters to the query string
  • Use the
    exhaustive
    parameter on
    search
    for exhaustive results ("all", "each", "every")
Common Pitfalls:
  • Don't use
    after:
    with future dates
  • For
    search
    , pass
    channel
    and
    app
    as separate parameters
  • Quote multi-word filter values in inline syntax:
    from:"John Smith"
结构化参数与内联过滤器对比:
  • search
    使用结构化参数 - 将过滤器作为独立工具参数传递
  • code_search
    employee_search
    gmail_search
    meeting_lookup
    使用内联过滤器 - 将过滤器包含在查询字符串中
日期过滤器使用时机:
  • 相对时间范围使用
    updated:
    (如"last week"、"past month")
  • 具体日期范围使用
    after:
    /
    before:
    (如"1月至3月之间"、"2024年以来")
  • 若没有具体时间范围,避免为"最新"或"最近"内容添加日期过滤器
  • meeting_lookup
    优先使用自然语言日期,而非内联过滤器
人员过滤器指南:
  • 多词姓名需加引号:
    from:"John Smith"
  • 文档创建者使用
    owner:
    ,更广泛的参与人员使用
    from:
  • 用户指代自己时使用
    me
搜索策略:
  • 先从宽泛的搜索开始,若结果过多再使用过滤器缩小范围
  • 对于
    search
    :添加参数过滤器缩小结果范围
  • 对于其他工具:在查询字符串中添加内联过滤器
  • 需要获取全部结果时(如"全部"、"每个"),在
    search
    中使用
    exhaustive
    参数
常见误区:
  • 不要为
    after:
    设置未来日期
  • 对于
    search
    channel
    app
    需作为独立参数传递
  • 内联语法中的多词过滤值需加引号:
    from:"John Smith"

Best Practices

最佳实践

  1. Cite sources: Always include URLs so users can verify
  2. Start broad, then narrow: Use filters to refine if too many results
  3. Combine signals: For expertise, check code + docs + meetings
  4. Respect permissions: Results are filtered by user access
  5. Note when empty: No results is useful information
  1. 引用来源:始终包含URL以便用户验证
  2. 由宽到窄:若结果过多,使用过滤器逐步缩小范围
  3. 多信号结合:如需了解专业知识,同时查看代码、文档和会议记录
  4. 尊重权限:结果会根据用户权限进行过滤
  5. 注明无结果:无结果也是有价值的信息

Related Commands

相关命令

Point users to structured workflows when appropriate:
  • /glean-search:search
    - Quick search
  • /glean-people:find-expert
    - Expertise discovery
  • /glean-meetings:catch-up
    - Return from time off
  • /glean-meetings:meeting-prep
    - Meeting preparation
  • /glean-people:stakeholders
    - Stakeholder mapping
  • /glean-docs:onboarding
    - Team onboarding
  • /glean-docs:verify-rfc
    - Spec verification
在合适的情况下,引导用户使用以下结构化工作流:
  • /glean-search:search
    - 快速搜索
  • /glean-people:find-expert
    - 专家查找
  • /glean-meetings:catch-up
    - 休假返岗跟进
  • /glean-meetings:meeting-prep
    - 会议准备
  • /glean-people:stakeholders
    - 干系人映射
  • /glean-docs:onboarding
    - 团队入职
  • /glean-docs:verify-rfc
    - 规范验证