Skip to content

Add description to metadata#1043

Merged
anannya03 merged 10 commits into
microsoft:mainfrom
anannya03:add_desc_in_metadata
Nov 5, 2025
Merged

Add description to metadata#1043
anannya03 merged 10 commits into
microsoft:mainfrom
anannya03:add_desc_in_metadata

Conversation

@anannya03
Copy link
Copy Markdown
Contributor

@anannya03 anannya03 commented Nov 4, 2025

What does this PR do?

Adds descriptive information for each metadata tool hint property (e.g., destructive, idempotent, etc.) so that content generation tools can produce richer documentation.

Previous
image

After
image

GitHub issue number?

#1017

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 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

@github-project-automation github-project-automation Bot moved this to Untriaged in Azure MCP Server Nov 4, 2025
@anannya03 anannya03 changed the title Add description to metadata [WIP]: Add description to metadata Nov 4, 2025
@joshfree joshfree added server-Azure.Mcp Azure.Mcp.Server tools-Core AZMCP Core functionality that all other tools build on top of labels Nov 4, 2025
@joshfree joshfree added this to the 2025-12 milestone Nov 4, 2025
@joshfree joshfree moved this from Untriaged to In Progress in Azure MCP Server Nov 4, 2025
@joshfree
Copy link
Copy Markdown
Member

joshfree commented Nov 4, 2025

cc: @diberry

@diberry
Copy link
Copy Markdown
Contributor

diberry commented Nov 4, 2025

Looks good to me - thank you for doing this so quickly.

@anannya03
Copy link
Copy Markdown
Contributor Author

/azp run mcp - pullrequest - live

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@anannya03 anannya03 marked this pull request as ready for review November 5, 2025 00:52
@anannya03 anannya03 requested review from a team as code owners November 5, 2025 00:52
@anannya03 anannya03 force-pushed the add_desc_in_metadata branch from d295651 to 28be1ae Compare November 5, 2025 03:18
Copilot AI review requested due to automatic review settings November 5, 2025 03:18
Copy link
Copy Markdown
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 refactors the ToolMetadata class to change metadata properties from simple boolean values to rich objects containing both a value and a description. The changes enable better documentation and understanding of tool behavior by providing human-readable descriptions for each metadata flag.

  • Introduces MetadataDefinition class to encapsulate metadata values with descriptions
  • Updates ToolMetadata serialization to output objects instead of booleans
  • Updates PowerShell script to access .value property from metadata objects

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
MetadataDefinition.cs New model class defining metadata structure with value and description properties
ToolMetadataJsonConverter.cs New JSON converter for serializing/deserializing ToolMetadata with MetadataDefinition
ToolMetadata.cs Refactored to use backing fields and expose MetadataDefinition properties for serialization
ServerJsonContext.cs Registered new types for AOT JSON serialization support
Update-AzCommandsMetadata.ps1 Updated to access .value property from metadata objects
consolidated-tools.json Updated JSON format with expanded metadata objects containing values and descriptions

Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadataJsonConverter.cs
Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadata.cs Outdated
Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadata.cs Outdated
Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadata.cs Outdated
Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadata.cs Outdated
Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadata.cs Outdated
Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadata.cs Outdated
Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadata.cs Outdated
Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadata.cs Outdated
Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadata.cs Outdated
anannya03 and others added 3 commits November 4, 2025 23:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@anannya03 anannya03 changed the title [WIP]: Add description to metadata Add description to metadata Nov 5, 2025
Copy link
Copy Markdown
Member

@joshfree joshfree left a comment

Choose a reason for hiding this comment

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

Missing CHANGELOG.md

Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadata.cs
Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadata.cs Outdated
Comment thread core/Azure.Mcp.Core/src/Commands/ToolMetadata.cs Outdated
@anannya03 anannya03 enabled auto-merge (squash) November 5, 2025 22:17
@anannya03 anannya03 merged commit 90bd141 into microsoft:main Nov 5, 2025
26 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Nov 5, 2025
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Dec 8, 2025
* add description to metadata

* added jsonconverter for sucessful deserialization

* addressed review comment

* added namespace

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* format

* fixed ordering

* removed unused usings, copyright

* addressed review comments

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server-Azure.Mcp Azure.Mcp.Server tools-Core AZMCP Core functionality that all other tools build on top of

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants