fix(tools): describe get_stock_info as multi-market, not A-share only (#2022)

The stock_code parameter was described to the model as "A-share stock
code, e.g., '600519'". The agent reads that schema literally and does not
call get_stock_info for US/HK tickers, so any skill relying on
fundamentals silently degrades to a price/news-only answer there.

The handler already supports these markets: for AAPL it returns
market="us", status="ok" with valuation, growth (revenue_yoy,
net_profit_yoy, roe, gross_margin) and earnings (revenue,
net_profit_parent, operating_cash_flow) populated via the yfinance
fundamental adapter. Only the description was misleading.

Verified with the growth_quality skill on AAPL: before, the agent called
get_daily_history/analyze_trend/get_chip_distribution/search_stock_news
and never get_stock_info, producing a purely technical summary. After, it
calls get_stock_info and the report cites ROE 141.5% and net profit
+19.4% YoY.
This commit is contained in:
oguz
2026-07-19 12:54:20 +03:00
committed by GitHub
parent 529f6f2061
commit 9b1b4bb871

View File

@@ -531,7 +531,7 @@ get_stock_info_tool = ToolDefinition(
ToolParameter(
name="stock_code",
type="string",
description="A-share stock code, e.g., '600519'",
description="Stock code: A-share '600519', US 'AAPL', HK '00700'",
),
],
handler=_handle_get_stock_info,