Skip to content

Conversation

@triepod-ai
Copy link

Summary

Adds MCP tool annotations (readOnlyHint, destructiveHint, title) to all 14 tools to help LLMs better understand tool behavior and make safer decisions about tool execution.

Changes

  • Added readOnlyHint: true to read-only tools:
    • getConsoleLogs, getConsoleErrors, getNetworkErrors, getNetworkLogs
    • getSelectedElement
    • runAccessibilityAudit, runPerformanceAudit, runSEOAudit
    • runNextJSAudit, runDebuggerMode, runAuditMode, runBestPracticesAudit
  • Added destructiveHint: true to tools that modify state:
    • takeScreenshot (creates files)
    • wipeLogs (clears data)
  • Added title annotations for human-readable display
  • Bump MCP SDK dependency from ^1.4.1 to ^1.7.0 for annotation support

Why This Matters

Tool annotations provide semantic metadata that helps MCP clients:

  • Safety automation: Clients like Claude Code can auto-approve readOnlyHint: true tools without confirmation
  • UI/UX improvements: Clients can display appropriate warnings/icons for destructive operations
  • Tool discovery: Clients can filter/group tools by characteristics

Testing

  • Server builds successfully (npm run build)
  • Live verification: Started server and confirmed tools/list returns annotations for all 14 tools
  • Annotation values match actual tool behavior (read-only vs destructive)

Verification Output

Total tools: 14

Tool Name                      Title                          ReadOnly   Destructive
--------------------------------------------------------------------------------
getConsoleLogs                 Get Console Logs               True       N/A       
getConsoleErrors               Get Console Errors             True       N/A       
getNetworkErrors               Get Network Errors             True       N/A       
getNetworkLogs                 Get Network Logs               True       N/A       
takeScreenshot                 Take Screenshot                N/A        True      
getSelectedElement             Get Selected Element           True       N/A       
wipeLogs                       Wipe Logs                      N/A        True      
runAccessibilityAudit          Run Accessibility Audit        True       N/A       
runPerformanceAudit            Run Performance Audit          True       N/A       
runSEOAudit                    Run SEO Audit                  True       N/A       
runNextJSAudit                 Run Next.js Audit              True       N/A       
runDebuggerMode                Run Debugger Mode              True       N/A       
runAuditMode                   Run Audit Mode                 True       N/A       
runBestPracticesAudit          Run Best Practices Audit       True       N/A

🤖 Generated with Claude Code

Add readOnlyHint and destructiveHint annotations to all 14 tools
to help LLMs better understand tool behavior and make safer decisions.

Changes:
- Added readOnlyHint: true to read-only tools (getConsoleLogs,
  getConsoleErrors, getNetworkErrors, getNetworkLogs, getSelectedElement,
  runAccessibilityAudit, runPerformanceAudit, runSEOAudit, runNextJSAudit,
  runDebuggerMode, runAuditMode, runBestPracticesAudit)
- Added destructiveHint: true to tools that modify state (takeScreenshot,
  wipeLogs)
- Added title annotations for human-readable display
- Bump MCP SDK from ^1.4.1 to ^1.7.0 for annotation support

This improves tool safety metadata for MCP clients.

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

Co-Authored-By: Claude <[email protected]>
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.

2 participants