microsoft-code-reference
Installation
Summary
Verify Microsoft SDK methods, find working code samples, and catch hallucinated APIs against official docs.
- Three core tools:
microsoft_docs_searchfor API lookups,microsoft_code_sample_searchfor working examples in C#/Python/JavaScript, andmicrosoft_docs_fetchfor full reference pages with overloads - Catches common mistakes like wrong method signatures, deprecated patterns, mismatched SDK versions (v11 vs v12), and incorrect package names
- Works with Azure SDKs, .NET libraries, and Microsoft Graph APIs; falls back to
mslearnCLI if the Learn MCP Server is unavailable - Recommended workflow: confirm method exists, fetch full details for complex parameters, then find a working sample before writing code
SKILL.md
Microsoft Code Reference
Tools
| Need | Tool | Example |
|---|---|---|
| API method/class lookup | microsoft_docs_search |
"BlobClient UploadAsync Azure.Storage.Blobs" |
| Working code sample | microsoft_code_sample_search |
query: "upload blob managed identity", language: "python" |
| Full API reference | microsoft_docs_fetch |
Fetch URL from microsoft_docs_search (for overloads, full signatures) |
Finding Code Samples
Use microsoft_code_sample_search to get official, working examples:
microsoft_code_sample_search(query: "upload file to blob storage", language: "csharp")
microsoft_code_sample_search(query: "authenticate with managed identity", language: "python")
microsoft_code_sample_search(query: "send message service bus", language: "javascript")