Skip to content

feat: Add MCP tool annotations for improved LLM integration#16

Open
bryankthompson wants to merge 1 commit into
financial-datasets:mainfrom
bryankthompson:feat/add-tool-annotations
Open

feat: Add MCP tool annotations for improved LLM integration#16
bryankthompson wants to merge 1 commit into
financial-datasets:mainfrom
bryankthompson:feat/add-tool-annotations

Conversation

@bryankthompson
Copy link
Copy Markdown

Summary

Add ToolAnnotations to all 11 tools to help LLM clients understand tool behavior and make better decisions about tool selection and user confirmations.

Changes

  • SDK Upgrade: mcp[cli]>=1.3.0mcp[cli]>=1.8.0 (required for annotations)
  • Added annotations to all 11 tools in server.py

Tool Annotations Added

Tool title readOnlyHint destructiveHint openWorldHint
get_income_statements Get Income Statements
get_balance_sheets Get Balance Sheets
get_cash_flow_statements Get Cash Flow Statements
get_current_stock_price Get Current Stock Price
get_historical_stock_prices Get Historical Stock Prices
get_company_news Get Company News
get_available_crypto_tickers Get Available Crypto Tickers
get_crypto_prices Get Crypto Prices
get_historical_crypto_prices Get Historical Crypto Prices
get_current_crypto_price Get Current Crypto Price
get_sec_filings Get SEC Filings

Annotation Rationale

  • readOnlyHint=true: All tools are read-only data retrieval operations
  • destructiveHint=false: No tools modify any data
  • openWorldHint=true: All tools call the external Financial Datasets API

Why This Matters

Tool annotations are part of the MCP specification that help AI clients:

  • Display appropriate confirmation dialogs for destructive operations
  • Make better decisions about autonomous tool execution
  • Show users accurate information about what tools do

Testing

  • ✅ Python import test passes
  • ✅ All 11 tools verified

🤖 Generated with Claude Code

Add ToolAnnotations to all 11 tools with appropriate hints:
- readOnlyHint: true for all tools (data retrieval only)
- destructiveHint: false for all tools (no data modification)
- openWorldHint: true for all tools (external Financial Datasets API)
- title: Human-readable tool names for UI display

Also upgrades mcp[cli] from 1.3.0 to 1.8.0 (required for annotations support).

Tool annotations help LLM clients understand tool behavior and make
better decisions about tool selection and user confirmations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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