Skip to content

fix: set correct hint annotations for tools #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 2, 2025
Merged

fix: set correct hint annotations for tools #10

merged 2 commits into from
Aug 2, 2025

Conversation

joshuap
Copy link
Member

@joshuap joshuap commented Aug 2, 2025

mcp-go defaults the destructive hint annotation to true for all tools. This sets the read-only and destructive hint annotations explicitly for each tool based on its behavior.

Fixes #7

@joshuap joshuap requested review from stympy and Copilot August 2, 2025 04:00
Copy link

@Copilot 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 fixes the default hint annotations for MCP tools by explicitly setting read-only and destructive annotations based on each tool's actual behavior. The mcp-go library was incorrectly defaulting all tools to destructive, which has been corrected by explicitly marking read-only tools as non-destructive.

  • Adds explicit WithReadOnlyHintAnnotation(true) and WithDestructiveHintAnnotation(false) for all read-only tools
  • Corrects the default destructive behavior that was being applied to non-destructive operations

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
internal/hbmcp/projects.go Updates project-related tools with correct hint annotations for read-only operations
internal/hbmcp/faults.go Updates fault-related tools with correct hint annotations for read-only operations

@joshuap joshuap merged commit 983e12c into main Aug 2, 2025
3 checks 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.

Claude Code shows get_ endpoints as destructive
2 participants