Microsoft Code Samples
Use the Microsoft Learn MCP server declared by this plugin to find current official examples.
Workflow
- Call
microsoft_code_sample_searchwith the SDK, class, API, or implementation task. - Provide the
languagefilter when the user names a programming language. - Compare the returned examples and select the one that best matches the user's runtime and SDK version.
- Use
microsoft_docs_searchandmicrosoft_docs_fetchwhen surrounding setup or API constraints are required. - Adapt examples only after distinguishing Microsoft-provided code from project-specific changes.
MCP
- Server ID:
microsoft-learn - Transport: hosted Streamable HTTP
- Authentication: none
- Expected tools:
microsoft_code_sample_search,microsoft_docs_search,microsoft_docs_fetch
Safety
- Do not claim that adapted code is copied verbatim from Microsoft Learn.
- Preserve source links returned by the MCP tools.
- Do not execute deployment or account-management commands unless the user separately requests them.