实操 03 · 英文原文 · 授权全文收录
微软官方 Skill 原例:查询文档与读取全文
完整收录 microsoft-docs/SKILL.md,查看真实作者如何定义触发条件、搜索词和读取时机。
- 原作者:
- MicrosoftDocs/mcp 项目贡献者
- 核对日期:
- 2026 年 10 月 17 日
核验范围
原文件完整保存;工具名、查询示例已与实际 MCP 调用核对。
未在用户账号中安装此技能;CLI 后备路径未实测。技能文件不能替代模型、客户端或 MCP 连接。
完整原教程
以下保留作者原文,不改写为本站自拟步骤。 排版与相对链接已转换,未执行原文中的代码;交叉核验补充另列。转载与译文遵循 CC BY 4.0,不代表原作者为本站背书。
name: microsoft-docs
description: Understand Microsoft technologies by querying official documentation. Use whenever the user asks how something works, wants tutorials, needs configuration options, limits, quotas, or best practices for any Microsoft technology (Azure, .NET, M365, Windows, Power Platform, etc.)—even if they don't mention "docs." If the question is about understanding a concept rather than writing code, this is the right skill.
context: fork
compatibility: Primarily uses the Microsoft Learn MCP Server (https://learn.microsoft.com/api/mcp); if that is unavailable, fall back to the mslearn CLI (`npx @microsoft/learn-cli`).
Microsoft Docs
Tools
| Tool | Use For |
|---|---|
microsoft_docs_search |
Find documentation—concepts, guides, tutorials, configuration |
microsoft_docs_fetch |
Get full page content (when search excerpts aren't enough) |
When to Use
- Understanding concepts — "How does Cosmos DB partitioning work?"
- Learning a service — "Azure Functions overview", "Container Apps architecture"
- Finding tutorials — "quickstart", "getting started", "step-by-step"
- Configuration options — "App Service configuration settings"
- Limits & quotas — "Azure OpenAI rate limits", "Service Bus quotas"
- Best practices — "Azure security best practices"
Query Effectiveness
Good queries are specific:
# ❌ Too broad
"Azure Functions"
# ✅ Specific
"Azure Functions Python v2 programming model"
"Cosmos DB partition key design best practices"
"Container Apps scaling rules KEDA"
Include context:
- Version when relevant (
.NET 8,EF Core 8) - Task intent (
quickstart,tutorial,overview,limits) - Platform for multi-platform docs (
Linux,Windows)
When to Fetch Full Page
Fetch after search when:
- Tutorials — need complete step-by-step instructions
- Configuration guides — need all options listed
- Deep dives — user wants comprehensive coverage
- Search excerpt is cut off — full context needed
Why Use This
- Accuracy — live docs, not training data that may be outdated
- Completeness — tutorials have all steps, not fragments
- Authority — official Microsoft documentation
CLI Alternative
If the Learn MCP server is not available, use the mslearn CLI from the command line instead:
# Run directly (no install needed)
npx @microsoft/learn-cli search "azure functions timeout"
# Or install globally, then run
npm install -g @microsoft/learn-cli
mslearn search "azure functions timeout"
| MCP Tool | CLI Command |
|---|---|
microsoft_docs_search(query: "...") |
mslearn search "..." |
microsoft_docs_fetch(url: "...") |
mslearn fetch "..." |
The fetch command also supports --section <heading> to extract a single section and --max-chars <number> to truncate output.
原文快照 SHA-256:23d6c309124c4dd7f96ef7166a1998814b4eaeca7e3d654bdac2feacde7e16d1
交叉核验补充
以下为本站核对说明,与上方原教程区分展示。
安装仍以仓库说明为准
该文件是现成技能,不是独立安装器。仓库 README 提供插件和技能文件夹安装路径,使用前先完成对应客户端连接。