Skip to content

[Doc Gap] Search index query — --subscription parameter removed but still documented #3048

Description

@github-actions

Documentation Gap

Server: Azure.Mcp.Server
Tool directory: tools/Azure.Mcp.Tools.Search
Triggered by: commit ec2f45a8 (PR #2954) by @alzimmermsft
Changed files:

  • tools/Azure.Mcp.Tools.Search/src/Commands/Index/IndexQueryCommand.cs (modified)
  • tools/Azure.Mcp.Tools.Search/src/Options/Index/IndexQueryOptions.cs (modified)

What Changed

PR #2954 migrated Search tools to the new two-generic option pattern. As part of this, IndexQueryCommand was changed from a SubscriptionCommand to an AuthenticatedCommand, and IndexQueryOptions was refactored to a flat POCO with [Option] attributes containing only: Query, Service, Index, and RetryPolicy. The Subscription property was removed.

Gaps Found

  • azmcp-commands.md still documents --subscription <subscription> as a parameter for azmcp search index query, but this parameter no longer exists in IndexQueryOptions and the command no longer extends SubscriptionCommand.

Files to Update

  • servers/Azure.Mcp.Server/docs/azmcp-commands.md

Context

Current (incorrect) docs:

# Query AI Search index
# ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired
azmcp search index query --subscription <subscription> \
                         --service <service> \
                         --index <index> \
                         --query <query>

New IndexQueryOptions (no Subscription):

public sealed class IndexQueryOptions
{
    [Option(Description = "The search query to execute against the Azure AI Search index.")]
    public required string Query { get; set; }

    [Option(Description = SearchOptionDescriptions.Service)]
    public required string Service { get; set; }

    [Option(Description = SearchOptionDescriptions.Index)]
    public required string Index { get; set; }

    [OptionContainer(Prefix = "retry")]
    public RetryPolicyOptions? RetryPolicy { get; set; }
}
📐 Implementation Guide

This section contains step-by-step instructions for a coding agent to implement the changes described above.

Step 1: Modify files

File: servers/Azure.Mcp.Server/docs/azmcp-commands.md

Edit the azmcp search index query example. Remove --subscription <subscription> \ from the command example so it reads:

# Query AI Search index
# ❌ Destructive | ✅ Idempotent | ❌ OpenWorld | ✅ ReadOnly | ❌ Secret | ❌ LocalRequired
azmcp search index query --service <service> \
                         --index <index> \
                         --query <query>

Step 2: Verify documentation structure

servers/Azure.Mcp.Server/docs/azmcp-commands.md — must include:

  • A global options table at the top (subscription, resource-group, tenant, retry-max-retries, retry-delay)
  • One ## azmcp <service> <resource> <operation> section per command, containing a description, parameters table, and example usage block

Step 3: Validate

Run these commands in order:

  1. dotnet build servers/Azure.Mcp.Server/ — confirms the server project compiles cleanly
  2. .\eng\common\spelling\Invoke-Cspell.ps1 — checks spelling in modified documentation

Next Steps

Tip

Ready for automated implementation? Assign this issue to @copilot to have Copilot coding agent implement the changes described in the Implementation Guide above

Generated by Documentation Updater · ● 4.8M ·

Metadata

Metadata

Assignees

No one assigned

    Labels

    copilotdocumentationImprovements or additions to documentation

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions