1
---
2
name: microsoft-docs
3
description: 'Query official Microsoft documentation to find concepts, tutorials, and code examples across Azure, .NET, Agent Framework, Aspire, VS Code, GitHub, and more. Uses Microsoft Learn MCP as the default, with Context7 and Aspire MCP for content that lives outside learn.microsoft.com.'
4
---
5
6
# Microsoft Docs
7
8
Research skill for the Microsoft technology ecosystem. Covers learn.microsoft.com and documentation that lives outside it (VS Code, GitHub, Aspire, Agent Framework repos).
9
10
---
11
12
## Default: Microsoft Learn MCP
13
14
Use these tools for **everything on learn.microsoft.com** — Azure, .NET, M365, Power Platform, Agent Framework, Semantic Kernel, Windows, and more. This is the primary tool for the vast majority of Microsoft documentation queries.
15
16
| Tool | Purpose |
17
|------|---------|
18
| `microsoft_docs_search` | Search learn.microsoft.com — concepts, guides, tutorials, configuration |
19
| `microsoft_code_sample_search` | Find working code snippets from Learn docs. Pass `language` (`python`, `csharp`, etc.) for best results |
20
| `microsoft_docs_fetch` | Get full page content from a specific URL (when search excerpts aren't enough) |
21
22
Use `microsoft_docs_fetch` after search when you need complete tutorials, all config options, or when search excerpts are truncated.
23
24
### CLI Alternative
25
26
If the Learn MCP server is not available, use the `mslearn` CLI from your terminal or shell (for example, Bash, PowerShell, or cmd) instead:
27
28
```bash
29
# Run directly (no install needed)
30
npx @microsoft/learn-cli search "BlobClient UploadAsync Azure.Storage.Blobs"
31
32
# Or install globally, then run
33
npm install -g @microsoft/learn-cli
34
mslearn search "BlobClient UploadAsync Azure.Storage.Blobs"
35
```
36
37
| MCP Tool | CLI Command |
38
|----------|-------------|
39
| `microsoft_docs_search(query: "...")` | `mslearn search "..."` |
40
| `microsoft_code_sample_search(query: "...", language: "...")` | `mslearn code-search "..." --language ...` |
41
| `microsoft_docs_fetch(url: "...")` | `mslearn fetch "..."` |
42
43
Pass `--json` to `search` or `code-search` to get raw JSON output for further processing.
44
45
---
46
47
## Exceptions: When to Use Other Tools
48
49
The following categories live **outside** learn.microsoft.com. Use the specified tool instead.
50
51
### .NET Aspire — Use Aspire MCP Server (preferred) or Context7
52
53
Aspire docs live on **aspire.dev**, not Learn. The best tool depends on your Aspire CLI version:
54
55
**CLI 13.2+** (recommended) — The Aspire MCP server includes built-in docs search tools:
56
57
| MCP Tool | Description |
58
|----------|-------------|
59
| `list_docs` | Lists all available documentation from aspire.dev |
60
| `search_docs` | Weighted lexical search across aspire.dev content |
61
| `get_doc` | Retrieves a specific document by slug |
62
63
These ship in Aspire CLI 13.2 ([PR #14028](https://github.com/dotnet/aspire/pull/14028)). To update: `aspire update --self --channel daily`. Ref: https://davidpine.dev/posts/aspire-docs-mcp-tools/
64
65
**CLI 13.1** — The MCP server provides integration lookup (`list_integrations`, `get_integration_docs`) but **not** docs search. Fall back to Context7:
66
67
| Library ID | Use for |
68
|---|---|
69
| `/microsoft/aspire.dev` | Primary — guides, integrations, CLI reference, deployment |
70
| `/dotnet/aspire` | Runtime source — API internals, implementation details |
71
| `/communitytoolkit/aspire` | Community integrations — Go, Java, Node.js, Ollama |
72
73
### VS Code — Use Context7
74
75
VS Code docs live on **code.visualstudio.com**, not Learn.
76
77
| Library ID | Use for |
78
|---|---|
79
| `/websites/code_visualstudio` | User docs — settings, features, debugging, remote dev |
80
| `/websites/code_visualstudio_api` | Extension API — webviews, TreeViews, commands, contribution points |
81
82
### GitHub — Use Context7
83
84
GitHub docs live on **docs.github.com** and **cli.github.com**.
85
86
| Library ID | Use for |
87
|---|---|
88
| `/websites/github_en` | Actions, API, repos, security, admin, Copilot |
89
| `/websites/cli_github` | GitHub CLI (`gh`) commands and flags |
90
91
### Agent Framework — Use Learn MCP + Context7
92
93
Agent Framework tutorials are on learn.microsoft.com (use `microsoft_docs_search`), but the **GitHub repo** has API-level detail that is often ahead of published docs — particularly DevUI REST API reference, CLI options, and .NET integration.
94
95
| Library ID | Use for |
96
|---|---|
97
| `/websites/learn_microsoft_en-us_agent-framework` | Tutorials — DevUI guides, tracing, workflow orchestration |
98
| `/microsoft/agent-framework` | API detail — DevUI REST endpoints, CLI flags, auth, .NET `AddDevUI`/`MapDevUI` |
99
100
**DevUI tip:** Query the Learn website source for how-to guides, then the repo source for API-level specifics (endpoint schemas, proxy config, auth tokens).
101
102
---
103
104
## Context7 Setup
105
106
For any Context7 query, resolve the library ID first (one-time per session):
107
108
1. Call `mcp_context7_resolve-library-id` with the technology name
109
2. Call `mcp_context7_query-docs` with the returned library ID and a specific query
110
111
---
112
113
## Writing Effective Queries
114
115
Be specific — include version, intent, and language:
116
117
```
118
# ❌ Too broad
119
"Azure Functions"
120
"agent framework"
121
122
# ✅ Specific
123
"Azure Functions Python v2 programming model"
124
"Cosmos DB partition key design best practices"
125
"GitHub Actions workflow_dispatch inputs matrix strategy"
126
"Aspire AddUvicornApp Python FastAPI integration"
127
"DevUI serve agents tracing OpenTelemetry directory discovery"
128
"Agent Framework workflow conditional edges branching handoff"
129
```
130
131
Include context:
132
- **Version** when relevant (`.NET 8`, `Aspire 13`, `VS Code 1.96`)
133
- **Task intent** (`quickstart`, `tutorial`, `overview`, `limits`, `API reference`)
134
- **Language** for polyglot docs (`Python`, `TypeScript`, `C#`)
135