Investigate cross-namespace command misselection with oversized tool-discovery responses

Open
#4,068 2 comments 0 reactions 2 assignees View on GitHub

Maintainers usually reply within 2 days

@conniey is already working on this.

Since Oct 30, 2026.

Assessment

This issue has not been assessed yet.

Description

needs-team-attention server-Azure.Mcp tools-Core

Summary

Investigate command-selection failures across namespaces with large or overlapping discovery descriptions. This is not Advisor-specific: returning an entire command catalog with full parameter schemas can exceed the executor's inline-output limit, forcing agents to search saved files and potentially miss the intended command.

The October 27 Vally run (2026-10-27T20-56-29-523Z, claude-sonnet-5, copilot-sdk) recorded 22 command-selection failures across seven namespaces. File-backed MCP output previews occurred in 535 of 1,081 cases, including 17 of these 22 failures. This is evidence of discovery friction, not proof that output size caused every failure; routing ambiguity and incorrect expectations also need review.

Three top/ranking/result-limit cases are now tracked separately in microsoft/mcp#4070, leaving 19 failures across six namespaces in this issue. File-backed previews occurred in 15 of these 19 cases; the original-run totals above remain unchanged.

Failed prompts (19 remaining)

Case labels are from the original run only and may change when evaluations are regenerated. Identify each failure by its full prompt and expected command.

Advisor (8)
Original case Prompt Expected command
advisor evaluation 13 Fix or remediate the Advisor recommendation type id <recommendation-type-id>? advisor_remediation_get
advisor evaluation 14 Get the Advisor metadata catalog entry for recommendation type <recommendation-type-id> and return its impact and category; do not list active recommendation records advisor_metadata_get
advisor evaluation 18 Get the Azure CLI commands to remediate recommendation type id <recommendation-type-id> advisor_remediation_get
advisor evaluation 32 Is remediating recommendation type id <recommendation-type-id> destructive or reversible? advisor_remediation_get
advisor evaluation 80 Resolve or remediate Advisor recommendation type id <recommendation-type-id>? advisor_remediation_get
advisor evaluation 103 Show me the remediation steps for Advisor recommendation type id <recommendation-type-id> advisor_remediation_get
advisor evaluation 137 What does Advisor recommendation type <recommendation-type-id> mean? advisor_metadata_get
advisor evaluation 138 When does Advisor recommendation type <recommendation-type-id> retire? advisor_metadata_get
Resilience Management (5)
Original case Prompt Expected command
resiliency evaluation 15 Complete the fault injection stage of drill run <drill_run_name> for drill <drill_name> in service group <service_group> so the drill run can proceed resiliency_drill_run_mark-complete
resiliency evaluation 56 Get the recovery job resource <resource_name> for recovery job <recovery_job_name> of recoveryplan <recoveryplan_name> in service group <service_group> resiliency_recoveryjob_resource_get
resiliency evaluation 73 List all resources (members) of goal assignment <goal_assignment_name> in service group <service_group> resiliency_goal_resource_get
resiliency evaluation 74 List all resources (members) of recoveryplan <recoveryplan_name> in service group <service_group> resiliency_recoveryplan_resource_get
resiliency evaluation 134 Validate resilience drill <drill_name> in service group <service_group> for Reprotect without specifying source locations resiliency_drill_validate-for-execution
Monitor (3)
Original case Prompt Expected command
monitor evaluation 2 Begin guided Azure Monitor onboarding for project at <workspace_path> and give me step one monitor_instrumentation_orchestrator-start
monitor evaluation 11 Find distributed traces with errors in the last <time_period> for workspace <workspace_name> in resource group <resource_group> monitor_traces_query_run
monitor evaluation 62 Which trace stores do I have in resource group <resource_group>? monitor_traces_account_list
App Service (1)
Original case Prompt Expected command
appservice evaluation 24 Use Azure App Service diagnostics to diagnose web app <webapp> in resource group <resource_group> with detector <detector_name> appservice_webapp_diagnostic_diagnose
File Shares (1)
Original case Prompt Expected command
fileshares evaluation 18 Get the file share limits for subscription <subscription> in location <location> fileshares_limits
Well-Architected Framework (1)
Original case Prompt Expected command
wellarchitectedframework evaluation 3 What's the architectural guidance for Azure Cosmos DB wellarchitectedframework_serviceguide_get

Concrete example

Prompt (monitor evaluation 2):

Begin guided Azure Monitor onboarding for project at <workspace_path> and give me step one

The full discovery response advertised monitor_instrumentation_orchestrator-start, described as:

START HERE for Azure Monitor instrumentation. Analyzes workspace and returns the first action to execute.

However, the approximately 43 KB response was replaced inline with:

Output too large to read at once (43.0 KB). Saved to: ...

Preview (first 500 chars):

After file searches, some of which also returned oversized output, the agent explored Deploy commands and concluded:

No Azure Monitor MCP command provides a "guided onboarding workflow" with sequential steps ...

It never invoked the advertised onboarding command. The full response was retained at execution time; this was executor-side previewing, not server-side data loss.

Actions and acceptance criteria

  • Review the remaining 19 failures for discovery problems versus ambiguous ownership or grader expectations. Ranking/result-limit semantics are tracked separately in microsoft/mcp#4070.
  • Evaluate namespace-independent progressive disclosure through microsoft/mcp#3715: concise command discovery followed by targeted schema retrieval, rather than full catalogs.
  • Verify agents can discover less-obvious commands without relying on filename searches or guessed command names.
  • Compare baseline and treatment using the same model, prompts, and environment; repeat cases to distinguish consistent improvements from stochastic selection.
  • Re-enable prompts currently marked investigation-required only after intended command selection is verified.

These evaluations measure tool selection only. Expected commands returning Azure subscription, permission, or consent errors are not failures to fix here.

Related work

  • microsoft/mcp#4070: the three top-N/ranking/result-limit cases split from this investigation.

  • microsoft/mcp#3715: progressive disclosure for learn=true; implementation work should be coordinated there rather than duplicated.

  • microsoft/vally#1393: opt-in retention of file-backed large tool outputs so discovery failures remain inspectable after temporary-directory cleanup. This complements discovery improvements; retention alone does not reduce output size.

  • microsoft/mcp#3266: earlier cross-namespace command-selection investigation.

Dominant language
C#
Stars
3.9k
Forks
689
Avg merge
2d 11h
Merged PRs (30d)
143

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/mcp

All issues in microsoft/mcp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.