We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/twjackysu/TWSEMCPServer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
daily.py•593 B
"""Daily trading data tools."""
from utils import TWSEAPIClient, format_properties_with_values_multiline
def register_tools(mcp):
"""Register daily trading tools with the MCP instance."""
@mcp.tool
def get_stock_daily_trading(code: str) -> str:
"""Obtain daily trading information for a listed company stock based on its stock code."""
try:
data = TWSEAPIClient.get_company_data("/exchangeReport/STOCK_DAY_ALL", code)
return format_properties_with_values_multiline(data) if data else ""
except Exception:
return ""