Skip to main content
Glama

NS Pros MCP Gateway

ms-learn__microsoft_code_sample_search

Search for code snippets and examples in official Microsoft Learn documentation. This tool retrieves relevant code samples from Microsoft documentation pages providing developers with practical implementation examples and best practices for Microsoft/Azure products and services related coding tasks. This tool will help you use the LATEST OFFICIAL code snippets to empower coding capabilities.

When to Use This Tool

  • When you are going to provide sample Microsoft/Azure related code snippet

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "ms-learn__microsoft_code_sample_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesa descriptive query, SDK name, method name or code snippet related to Microsoft/Azure products, services, platforms, developer tools, frameworks, APIs or SDKs
languageNoOptional parameter specifying the programming language of code snippets to retrieve. Can significantly improve search quality if provided. Eligible values: csharp javascript typescript python powershell azurecli al sql java kusto cpp go rust ruby php

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the whole burden. It does disclose the source (official Microsoft Learn documentation pages) and asserts recency ('LATEST OFFICIAL'), which is useful behavioral context, but says nothing about how many results come back, how results are ranked or paginated, or whether failures/auth are possible.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first two sentences largely restate each other ('retrieves relevant code samples from Microsoft documentation pages... providing developers with practical implementation examples'), and the 'empower coding capabilities' clause is marketing filler. The 'When to Use' header is well front-loaded, but the prose could be cut roughly in half without loss.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter search with full schema coverage this is adequate: an agent knows what it searches and when to call it. However, with no annotations and no output schema, the description should say what a result looks like (snippet plus source URL, title, language) so the agent can plan the follow-up fetch step.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema already explains both 'query' (SDK name, method name, code snippet) and 'language' (eligible values, quality improvement). The description adds no query-phrasing strategy or language-selection advice beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a concrete verb+resource pair ('Search for code snippets and examples in official Microsoft Learn documentation') and scopes it to Microsoft/Azure products. It is clearly distinguishable from a generic docs search by emphasizing code samples, but it never names the sibling docs-search tool it is meant to complement, leaving that differentiation implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

A dedicated 'When to Use This Tool' section gives an explicit trigger: the agent should call it when about to supply Microsoft/Azure sample code. That is a clear context, but there is no when-not guidance and no mention of alternatives (e.g. the general docs search) for queries that are conceptual rather than code-oriented.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.