[BUG] Documentation search returns duplicate language variants without result-size controls
Maintainers usually reply within 2 days
@alzimmermsft is already working on this.
Since Nov 2, 2026.
Assessment
This issue has not been assessed yet.
Description
Describe the bug
microsoft_docs_search can return many duplicate language variants for the same canonical Microsoft Learn URL/section, and its schema provides no maxResults, canonical-URL deduplication, product-version filter, or general documentation language filter. This inflates tool output and drives additional search-result parsing and page-fetch calls in agent sessions.
This surfaced in microsoft/GitHub-Copilot-for-Azure skill-improvement run 40389600647:
- Queue-trigger searches returned 10 chunks but only 3 distinct canonical URLs (7 duplicate rows). Seven results were language variants of the same
#poison-messagessection. - Cosmos DB searches returned 10 chunks with 7–9 distinct URLs.
- Durable Functions searches returned 10 chunks with 9 distinct URLs.
- Search/fetch responses frequently exceeded the host display limit, causing spill-to-file plus extra
rg,view, or parsing calls.
There were no exact duplicate documentation calls within a trial; the duplication was in the search result set itself.
Expected behavior
Search and fetch results should provide the smallest relevant first-party evidence set needed to answer the query without forcing the agent to process equivalent variants or entire unrelated pages.
Search behavior
- Deduplicate results by canonical URL plus fragment before returning them. Equivalent language variants of the same section should occupy one result unless the user requests a specific language or language comparison.
- Add optional
maxResults/topcontrol with the current default retained for compatibility. - Add optional filters for documentation language and product/runtime version where those dimensions exist.
- Rank results matching the requested service, trigger, and intent above similarly named but unrelated services. A Queue trigger query should not spend result slots on Blob poison-message pages unless they add unique relevant evidence.
- Return distinct high-value pages rather than multiple excerpts from one canonical section when those excerpts are substantially equivalent.
Fetch behavior
- When the URL includes a fragment, support returning the relevant anchored section rather than always returning the full page.
- Add an optional
maxTokensormaxCharsresponse limit, with clear truncation metadata and a continuation mechanism if needed.
Acceptance criteria
- The reproduction query returns one canonical
#poison-messagesQueue trigger result rather than separate Java, JavaScript, C#, Python, PowerShell, TypeScript, and Go rows. - Returned URLs are unique after canonicalization unless their excerpts contain materially different requested-language content.
- A caller can request fewer than 10 results.
- A caller can constrain language when language-specific documentation is relevant.
- Fetching an anchored page can return only that section within a caller-specified size budget.
- Tests cover canonical URL/fragment deduplication, language filtering, result limits, and unrelated-service ranking.
Observed prompt and search-query examples
These are exact evaluation prompts and microsoft_docs_search queries from run 40389600647.
Queue trigger poison messages
User prompt:
My Azure Function queue trigger keeps moving messages to the poison queue after 5 dequeue attempts. How do I diagnose why the messages are failing?
Search query:
Azure Functions Storage Queue trigger poison queue maxDequeueCount diagnose failed invocation Application Insights exceptions host.json visibilityTimeout
This returned 10 chunks but only 3 distinct canonical URLs. Seven chunks were language variants of the same Queue trigger #poison-messages section.
Cosmos DB trigger deserialization
User prompt:
My Cosmos DB trigger function is throwing deserialization errors because incoming documents are missing fields my POCO expects. Restarting the change feed from the beginning didn't help. How do I troubleshoot this?
Search queries from the two repetitions:
Azure Functions Cosmos DB trigger C# POCO deserialization missing fields JsonElement IReadOnlyList StartFromBeginning lease checkpoint
Azure Functions Cosmos DB trigger .NET POCO deserialization missing fields StartFromBeginning existing leases checkpoints JsonElement JObject raw JSON
Each returned 10 chunks, with only 7–9 distinct canonical URLs and several legacy or repeated page sections.
Durable Functions stuck orchestration
User prompt:
One of my Durable Functions orchestrations has been stuck in the Running status for hours and never completes. How do I diagnose whether this is a non-determinism issue or something else, and how should I add a safe timeout?
Search query:
Azure Durable Functions stuck Running diagnose non-determinism replay instance history Application Insights DurableTask timeout CreateTimer Task.WhenAny cancel timer
This returned 10 chunks with 9 distinct canonical URLs. The agent then used full-page fetches for diagnostics, durable timers, and orchestration constraints, increasing the number of turns and accumulated context.
Actual behavior
A Queue trigger poison-message query returned Java, JavaScript, C#, Python, PowerShell, TypeScript, and Go variants that all resolved to the same canonical functions-bindings-storage-queue-trigger#poison-messages URL, plus unrelated Blob poison-message results.
The command schema accepts only:
{ "query": "..." }
and always returns up to 10 chunks. The agent then has to parse a large result set and fetch pages separately.
Reproduction Steps
- Invoke
microsoft_docs_searchwith:
Azure Functions Storage Queue trigger poison queue maxDequeueCount diagnose failed invocation Application Insights exceptions host.json visibilityTimeout
- Inspect the returned URLs.
- Observe multiple language-specific rows for the same canonical Queue trigger poison-message section and unrelated Blob trigger rows.
Environment
- Azure MCP Server documentation tool through GitHub Copilot CLI
- Copilot CLI 1.0.103
- Linux GitHub Actions runner
- Evidence: https://github.com/microsoft/GitHub-Copilot-for-Azure/actions/runs/40389600647
- Dominant language
- C#
- Stars
- 3.9k
- Forks
- 689
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 143
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/mcp
-
[BUG] speech tts synthesize rejects valid locales such as fil-PH, yue-CN and sr-Latn-RS in --languagePossibly taken @Shizoqua claimed this today. OpenAzure.Mcp.Server needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
[BUG] deploy architecture diagram generate never shows Docker settings for container appsPossibly taken @Shizoqua claimed this today. OpenAzure.Mcp.Server needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 2 days
-
[BUG] Single mode: an unknown tool name fails with "An error occurred invoking 'azure'" instead of listing the available toolsPossibly taken @Ahmed-Manai claimed this 9 days ago. Openserver-Azure.Mcp
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
[BUG] pricing get drops tierMinimumUnits, so tiered meters return same-meter prices with no thresholdPossibly taken @msalaman claimed this 29 days ago. Opencustomer-reported needs-team-triage question server-Azure.Mcp tools-Price tools-Pricing
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/mcp#4087 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
[Doc Gap] README.md still shows removed "Basic" resilience usage plan tier after GA SDK updateMay be free again @anishsinghhh3-bit claimed this 32 days ago, and no pull request is open. Opencopilot documentation server-Azure.Mcp tools-ResilienceManagement
Difficulty 1/5 Under an hour Newbie friendliness 86/100
microsoft/mcp#4008 · 2 comments ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
microsoft/fluentui-blazor#5721 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Project dependencies are outdatedPossibly taken @yasmoradi claimed this today. Opendependencies
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
bitfoundation/bitplatform#15616 ·
Maintainers usually reply within 1 day
-
:watch: Not Triaged Pri3
Difficulty 1/5 Under an hour Newbie friendliness 91/100
Maintainers usually reply within 1 day
-
area-controls-shell platform/android
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
dotnet/maui#41304 · 1 reaction ·
Maintainers usually reply within 1 day