Skip to content

Conversation

@fanyang-mono
Copy link
Contributor

@fanyang-mono fanyang-mono commented Jan 9, 2026

What does this PR do?

I've noticed some code generation prompts sometimes didn't trigger bestpractices tool. I am making this change to specifically call out generating code for any Azure services

GitHub issue number?

N/A

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

@fanyang-mono
Copy link
Contributor Author

This is a minor change which doesn't need to be included in the changelog.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Azure MCP server instruction rules to make the trigger for the bestpractices tool more specific. The change clarifies that the tool should be invoked when "generating code for any Azure services" rather than just "generating code for Azure", which should help improve the reliability of the tool being triggered during code generation prompts.

  • Updates the "Use Azure Code Gen Best Practices" rule to be more explicit about Azure services

- Only call your `bestpractices` tool when you are sure the user is discussing Azure; do not call it otherwise.
- Use Azure AI App Code Generation Best Practices: When generating code for AI applications, AI agents, workflows,
or chatbots, invoke your `get_bestpractices_ai_app` command (under `get_bestpractices` tool) if tool available.
or chatbots, invoke your `get_bestpractices_ai_app` command (under `get_azure_bestpractices` tool) if tool available.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concept of "under" may not be clear to the LLM. It can be more explicitly said as "call get_azure_bestpractices tool and follow its response to get the ai app bestpractices. I suppose the LLM can figure out the argument value get_bestpractices_ai_app to use when there is enough context from the response.

Copy link
Contributor Author

@fanyang-mono fanyang-mono Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AI app bestpractices piece was added and tested by the ai toolkit team. They were satisfied with its performance. I will leave it for them to decide. @XiaofuHuang FYI about Jason's suggestion above.

@fanyang-mono fanyang-mono requested a review from a team as a code owner January 12, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

3 participants