mcp-tool-discovery
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMCP Tool Discovery Guide
MCP工具发现指南
Snow-Flow provides 400+ tools via MCP (Model Context Protocol) servers. Tools are lazy-loaded to save tokens - use to discover them.
tool_searchSnow-Flow通过MCP(Model Context Protocol)服务器提供400+种工具。工具采用延迟加载(lazy-loaded)机制以节省token - 使用来发现它们。
tool_searchQuick Start
快速开始
javascript
// Find tools for a specific task
tool_search({ query: "incident" }) // ServiceNow incidents
tool_search({ query: "widget" }) // Widget development
tool_search({ query: "update set" }) // Update Set management
tool_search({ query: "cmdb" }) // CMDB operationsjavascript
// 查找特定任务的工具
tool_search({ query: "incident" }) // ServiceNow事件
tool_search({ query: "widget" }) // 组件开发
tool_search({ query: "update set" }) // 更新集管理
tool_search({ query: "cmdb" }) // 配置管理数据库(CMDB)操作Tool Categories
工具分类
ServiceNow Core Operations
ServiceNow核心操作
| Query | Tools Found |
|---|---|
| Incident CRUD, metrics, SLA |
| Change requests, CAB, risk |
| Problem management, known errors |
| CI search, relationships, discovery |
| User/group queries |
| Universal table queries |
| 查询语句 | 找到的工具 |
|---|---|
| 事件CRUD、指标、SLA |
| 变更请求、变更咨询委员会(CAB)、风险 |
| 问题管理、已知错误 |
| 配置项搜索、关联关系、发现 |
| 用户/组查询 |
| 通用表查询 |
ServiceNow Development
ServiceNow开发
| Query | Tools Found |
|---|---|
| Widget create/update/sync |
| BR creation and management |
| Reusable scripts |
| Client-side scripts |
| Form policies |
| Buttons and links |
| Update Set lifecycle |
| Artifact deployment |
| 查询语句 | 找到的工具 |
|---|---|
| 组件创建/更新/同步 |
| 业务规则创建与管理 |
| 可复用脚本 |
| 客户端脚本 |
| 表单规则 |
| 按钮与链接 |
| 更新集生命周期管理 |
| 工件部署 |
ServiceNow Platform
ServiceNow平台
| Query | Tools Found |
|---|---|
| Flow/subflow creation |
| Workspace builder |
| Service catalog items |
| Knowledge articles |
| Email notifications |
| Scheduled scripts |
| REST API integration |
| Import sets, transform maps |
| 查询语句 | 找到的工具 |
|---|---|
| 流程/子流程创建 |
| 工作区构建器 |
| 服务目录项 |
| 知识库文章 |
| 邮件通知 |
| 定时脚本 |
| REST API集成 |
| 导入集、转换映射 |
Activity & Instance
活动与实例
| Query | Tools Found |
|---|---|
| Activity tracking (always available) |
| Instance URL and config |
| System properties |
| System logs |
| 查询语句 | 找到的工具 |
|---|---|
| 活动跟踪(始终可用) |
| 实例URL与配置 |
| 系统属性 |
| 系统日志 |
Enterprise (if enabled)
企业级工具(若已启用)
| Query | Tools Found |
|---|---|
| Jira issues, transitions, comments |
| Work items, boards, pipelines |
| Pages, spaces, search |
| Issues, PRs, workflows, releases |
| Issues, MRs, pipelines |
| 查询语句 | 找到的工具 |
|---|---|
| Jira问题、状态转换、评论 |
| 工作项、看板、流水线 |
| 页面、空间、搜索 |
| 问题、拉取请求、工作流、发布 |
| 问题、合并请求、流水线 |
Always-Available Tools
始终可用的工具
These tools are loaded by default (no discovery needed):
javascript
// Activity tracking
activity_start({ source, storyTitle, storyType, ... })
activity_update({ activityId, status, summary })
activity_complete({ activityId, summary })
activity_add_artifact({ activityId, artifactType, ... })
// Core tool discovery
tool_search({ query, enable: true })这些工具默认加载(无需发现):
javascript
// 活动跟踪
activity_start({ source, storyTitle, storyType, ... })
activity_update({ activityId, status, summary })
activity_complete({ activityId, summary })
activity_add_artifact({ activityId, artifactType, ... })
// 核心工具发现
tool_search({ query, enable: true })How tool_search Works
tool_search的工作原理
- Search - Finds tools matching your query
- Enable - Automatically enables found tools for your session
- Use - Call the discovered tool by name
javascript
// Step 1: Search
tool_search({ query: "jira" })
// Returns: jira_search_issues, jira_get_issue, jira_create_issue, ...
// Step 2: Call discovered tool
jira_search_issues({ jql: "project = PROJ AND status = Open" })- 搜索 - 找到与查询匹配的工具
- 启用 - 自动为当前会话启用找到的工具
- 使用 - 通过名称调用已发现的工具
javascript
// 步骤1:搜索
tool_search({ query: "jira" })
// 返回:jira_search_issues, jira_get_issue, jira_create_issue, ...
// 步骤2:调用已发现的工具
jira_search_issues({ jql: "project = PROJ AND status = Open" })Search Tips
搜索技巧
Be Specific
具体化查询
javascript
// Too broad - may not find what you need
tool_search({ query: "github" }) // Returns 20+ tools
// More specific - finds exactly what you need
tool_search({ query: "github content" }) // File content tools
tool_search({ query: "github repository" }) // Repo info tools
tool_search({ query: "github pull request" }) // PR toolsjavascript
// 过于宽泛 - 可能无法找到所需内容
tool_search({ query: "github" }) // 返回20+种工具
// 更具体 - 精准找到所需内容
tool_search({ query: "github content" }) // 文件内容工具
tool_search({ query: "github repository" }) // 仓库信息工具
tool_search({ query: "github pull request" }) // 拉取请求工具Search by Action
按操作搜索
javascript
tool_search({ query: "create incident" })
tool_search({ query: "update widget" })
tool_search({ query: "query cmdb" })
tool_search({ query: "deploy business rule" })javascript
tool_search({ query: "create incident" })
tool_search({ query: "update widget" })
tool_search({ query: "query cmdb" })
tool_search({ query: "deploy business rule" })Search by Table
按表搜索
javascript
tool_search({ query: "sys_script_include" })
tool_search({ query: "sp_widget" })
tool_search({ query: "sysevent_email_action" })javascript
tool_search({ query: "sys_script_include" })
tool_search({ query: "sp_widget" })
tool_search({ query: "sysevent_email_action" })Tool Naming Patterns
工具命名规范
Tools follow consistent naming patterns:
| Pattern | Example | Purpose |
|---|---|---|
| | ServiceNow operations |
| | Artifact creation |
| | Update operations |
| | Jira integration |
| | Azure DevOps |
| | Confluence |
| | GitHub |
| | GitLab |
工具遵循一致的命名模式:
| 模式 | 示例 | 用途 |
|---|---|---|
| | ServiceNow操作 |
| | 工件创建 |
| | 更新操作 |
| | Jira集成 |
| | Azure DevOps集成 |
| | Confluence集成 |
| | GitHub集成 |
| | GitLab集成 |
MCP Server Categories
MCP服务器分类
Snow-Flow includes specialized MCP servers:
| Server | Purpose | Example Tools |
|---|---|---|
| ServiceNow Unified | Core ServiceNow ops | Query, CRUD, scripts |
| ServiceNow Development | Artifact management | Deploy, widget sync |
| ServiceNow Automation | Script execution | Background scripts |
| ServiceNow ITSM | IT Service Management | Incidents, changes |
| ServiceNow Platform | Platform features | Flows, workspaces |
| Enterprise | External integrations | Jira, Azure, GitHub |
Snow-Flow包含专用的MCP服务器:
| 服务器 | 用途 | 示例工具 |
|---|---|---|
| ServiceNow Unified | ServiceNow核心操作 | 查询、CRUD、脚本 |
| ServiceNow Development | 工件管理 | 部署、组件同步 |
| ServiceNow Automation | 脚本执行 | 后台脚本 |
| ServiceNow ITSM | IT服务管理 | 事件、变更 |
| ServiceNow Platform | 平台功能 | 流程、工作区 |
| Enterprise | 外部集成 | Jira、Azure、GitHub |
Best Practices
最佳实践
- Discover Before Using - Always use first
tool_search - Be Specific - Narrow queries find better matches
- Check Results - Review tool descriptions before calling
- Enable by Default - is the default
enable: true - Silent Discovery - Don't tell users you're discovering tools
- 使用前先发现 - 始终先使用
tool_search - 具体化查询 - 缩小查询范围以获得更匹配的结果
- 检查结果 - 调用前查看工具描述
- 默认启用 - 为默认设置
enable: true - 静默发现 - 不要告知用户正在发现工具
Troubleshooting
故障排除
| Issue | Solution |
|---|---|
| Tool not found | Try different query terms |
| Too many results | Be more specific in query |
| Tool doesn't work | Check parameters, may need auth |
| Enterprise tool missing | Verify enterprise auth status |
| 问题 | 解决方案 |
|---|---|
| 未找到工具 | 尝试不同的查询关键词 |
| 结果过多 | 让查询更具体 |
| 工具无法工作 | 检查参数,可能需要认证 |
| 企业级工具缺失 | 验证企业认证状态 |
Example Workflows
示例工作流
Finding Incident Tools
查找事件工具
javascript
// Discover
tool_search({ query: "incident" })
// Use discovered tools
snow_query_incidents({ filters: { active: true, priority: 1 } })
snow_create_incident({ short_description: "...", caller_id: "..." })javascript
// 发现工具
tool_search({ query: "incident" })
// 使用已发现的工具
snow_query_incidents({ filters: { active: true, priority: 1 } })
snow_create_incident({ short_description: "...", caller_id: "..." })Finding Widget Tools
查找组件工具
javascript
// Discover
tool_search({ query: "widget" })
// Use discovered tools
snow_find_artifact({ type: "widget", query: "incident" })
snow_widget_pull({ widget_name: "incident-dashboard", local_path: "./widgets" })javascript
// 发现工具
tool_search({ query: "widget" })
// 使用已发现的工具
snow_find_artifact({ type: "widget", query: "incident" })
snow_widget_pull({ widget_name: "incident-dashboard", local_path: "./widgets" })Finding Enterprise Tools
查找企业级工具
javascript
// Discover Jira tools
tool_search({ query: "jira" })
// Use discovered tools
jira_search_issues({ jql: "project = SNOW AND status = Open" })
jira_transition_issue({ issueKey: "SNOW-123", transition: "In Progress" })javascript
// 发现Jira工具
tool_search({ query: "jira" })
// 使用已发现的工具
jira_search_issues({ jql: "project = SNOW AND status = Open" })
jira_transition_issue({ issueKey: "SNOW-123", transition: "In Progress" })