Skip to content

Conversation

@triepod-ai
Copy link
Contributor

Summary

Add title and hint annotations to all 11 internal tools to help LLMs understand tool behavior and make safer decisions about tool usage.

  • Added WithTitleAnnotation() for human-readable tool names displayed in UI
  • Added WithReadOnlyHintAnnotation(true) for 7 read-only tools
  • Added WithDestructiveHintAnnotation(true) for 4 state-modifying tools

Tool Classification

Read-Only Tools (7 tools):

Tool Title Description
az_monitoring Azure Monitoring Metrics, health, logs
az_network_resources Azure Network Resources VNet, NSG, subnet info
get_aks_vmss_info Get AKS VMSS Info VMSS configuration
list_detectors List Detectors List AKS diagnostics
run_detector Run Detector Execute detector analysis
run_detectors_by_category Run Detectors By Category Run detector categories
az_advisor_recommendation Azure Advisor Recommendations Azure recommendations

Destructive Tools (4 tools):

Tool Title Description
az_aks_operations AKS Operations Create/delete/scale clusters
az_fleet Azure Fleet Multi-cluster fleet management
az_compute_operations Azure Compute Operations VM/VMSS operations
inspektor_gadget_observability Inspektor Gadget Observability Deploy/undeploy eBPF monitoring

Why This Matters

MCP tool annotations help LLMs:

  1. Display better UI - Title annotations provide human-readable names
  2. Make safer decisions - Hint annotations indicate which tools modify state
  3. Request appropriate confirmation - Destructive hints trigger user confirmation flows

Files Changed

  • internal/components/advisor/registry.go
  • internal/components/azaks/registry.go
  • internal/components/compute/azcommands.go
  • internal/components/compute/registry.go
  • internal/components/detectors/registry.go
  • internal/components/fleet/registry.go
  • internal/components/inspektorgadget/registry.go
  • internal/components/monitor/registry.go
  • internal/components/network/registry.go

Test plan

  • go build ./... compiles successfully
  • Run MCP server and verify annotations appear in tool listings
  • Test with Claude Desktop to confirm annotation behavior

🤖 Generated with Claude Code

Add title and hint annotations to all 11 internal tools to help LLMs
understand tool behavior and make safer decisions about tool usage.

Tool Annotations Added:

**Read-Only Tools (7 tools):**
- az_monitoring - Azure Monitor metrics/health/logs
- az_network_resources - VNet/NSG/subnet info
- get_aks_vmss_info - VMSS configuration
- list_detectors - List AKS diagnostic detectors
- run_detector - Execute AKS detector analysis
- run_detectors_by_category - Run detector categories
- az_advisor_recommendation - Azure Advisor recommendations

**Destructive Tools (4 tools):**
- az_aks_operations - Create/delete/scale AKS clusters
- az_fleet - Multi-cluster fleet management
- az_compute_operations - VM/VMSS operations
- inspektor_gadget_observability - Deploy/undeploy eBPF monitoring

Uses mark3labs/mcp-go annotation functions:
- WithTitleAnnotation() - Human-readable tool names
- WithReadOnlyHintAnnotation(true) - Safe read operations
- WithDestructiveHintAnnotation(true) - State-modifying operations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Member

@gossion gossion left a comment

Choose a reason for hiding this comment

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

Thanks for contribution.

@gossion gossion added this pull request to the merge queue Dec 29, 2025
Merged via the queue into Azure:main with commit 30d0748 Dec 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants