Skip to content

feat(client): display tool annotations in Tools tab#1066

Draft
olaservo wants to merge 3 commits intomodelcontextprotocol:mainfrom
olaservo:feature/tool-annotations-display
Draft

feat(client): display tool annotations in Tools tab#1066
olaservo wants to merge 3 commits intomodelcontextprotocol:mainfrom
olaservo:feature/tool-annotations-display

Conversation

@olaservo
Copy link
Member

@olaservo olaservo commented Feb 5, 2026

Summary

Display tool annotations in the Tools tab, showing all 4 MCP spec annotation hints with their values and whether they're explicitly set or implied defaults.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Refactoring (no functional changes)
  • Test updates
  • Build/CI improvements

Changes Made

  • Display all 4 tool annotation badges below the tool description:
    • Read-only, Destructive, Idempotent, Open-world
  • Show ✓/✗ prefix with green (true) or gray (false) styling
  • Differentiate explicit values (solid border) from implied defaults (dashed border, dimmed)
  • Include MCP spec descriptions in tooltips

MCP Spec Defaults (shown when annotations not set):

  • readOnlyHint: false
  • destructiveHint: true
  • idempotentHint: false
  • openWorldHint: true

Related Issues

Testing

  • Tested in UI mode
  • Tested in CLI mode
  • Tested with STDIO transport
  • Tested with SSE transport
  • Tested with Streamable HTTP transport
  • Added/updated automated tests
  • Manual testing performed

Test Results and/or Instructions

  1. Connect to Everything server via STDIO
  2. Go to Tools tab → List Tools
  3. Select get-annotated-message - should show explicit annotations (solid badges)
  4. Select any other tool (e.g., echo) - should show implied defaults (dashed/dimmed badges)
  5. Hover over badges to verify tooltips show descriptions and explicit/implied status

Checklist

  • Code follows the style guidelines (ran npm run prettier-fix)
  • Self-review completed
  • Code is commented where necessary
  • Documentation updated (README, comments, etc.)

Breaking Changes

None

Additional Context

🦉 Generated with Claude Code

olaservo and others added 3 commits January 25, 2026 06:09
Add visual badges to show tool annotations (readOnlyHint, destructiveHint,
idempotentHint, openWorldHint) when a tool is selected. Badges appear below
the tool description with color-coded styling:
- Read-only: blue
- Destructive: red
- Idempotent: gray outline
- Open-world: purple

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Display all 4 tool annotation badges (Read-only, Destructive, Idempotent,
Open-world) for every tool, showing:
- ✓/✗ prefix to indicate true/false value
- Green badge for true, gray for false
- Solid border for explicitly set values
- Dashed border + dimmed for implied defaults
- Tooltip explaining if value is explicit or implied

Follows MCP spec defaults:
- readOnlyHint: false
- destructiveHint: true
- idempotentHint: false
- openWorldHint: true

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Enhance tooltips to include descriptions from the MCP specification:
- Read-only: Tool does not modify its environment
- Destructive: Tool may perform destructive updates (delete/overwrite data)
- Idempotent: Calling repeatedly with same args has no additional effect
- Open-world: Tool may interact with external entities beyond its local environment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@olaservo olaservo marked this pull request as draft February 5, 2026 04:25
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.

1 participant