SuperAPI AI Directory

kimi-datasource

Data & analytics

View repository

Updated 10-16 01:19

About this skill

kimi-datasource — General-purpose data source assistant

0. How to invoke

This skill uses the two tools registered by the datasource MCP server. Do not manually execute scripts via Bash:

  • mcp__plugin-kimi-datasource_data__get_data_source_desc
  • mcp__plugin-kimi-datasource_data__call_data_source_tool

These two tools are hosted and executed by Kimi Code. Pass parameters directly as JSON according to the tool schema.

The tools read the local OAuth login credentials corresponding to the current Kimi Code environment; when KIMI_CODE_OAUTH_HOST / KIMI_CODE_BASE_URL is set, the isolated credentials of the corresponding environment are used. If there are no login credentials, have the user first run /login。

1. What capabilities this skill provides

This plugin has 12 external data sources attached. The "data source name" in each row is what is passed to get_data_source_desc as the name。

Capability domain Data source name Typical questions
A-shares / Hong Kong stocks / US stocks quotes and financials stock_finance_data "How much is Moutai now", "CATL 2024 financial report", "Tencent shareholders", "AI stocks in Hangzhou"
Yahoo Finance global finance yahoo_finance "Apple analyst ratings", "AAPL options chain", "Apple top ten institutional shareholders"
World Bank historical macro world_bank_open_data "China GDP over the years", "India inflation rate", "comparison of population growth across countries"
Chinese enterprise business registration information tianyancha "ByteDance shareholders", "BYD judicial risk", "CATL patents"
arXiv paper preprints arxiv "Find a RAG survey", "download 2406.xxxxx"
Google Scholar academic search scholar "Hinton's latest papers", "highly cited transformer survey literature"
Chinese laws and regulations / judicial cases yuandian_law "provisions of the Civil Code on residency rights", "help me look up legal provisions related to termination of labor contracts", "find a few precedents on unjust enrichment"
Wind (A-shares/funds/bonds/macro) wind "Moutai's minute chart today", "10-year government bond yield trend", "fund net value query"
IMF international macro (exchange rates / CPI / forecasts) imf "USD to RMB exchange rate", "GDP growth forecasts by country", "global inflation rate comparison"
Hang Seng Juyuan intelligent screening gildata "Screen stocks with net profit growth over 30% and ROE greater than 15%", "fund manager screening"
US SEC disclosure filings sec_edgar "Tesla 10-K annual report", "Apple 10-Q quarterly report", "Form 4 insider transactions", "13F institutional holdings"
S&P Capital IQ US stock fundamentals sp_data "Apple analyst consensus estimates", "US stock valuation ratio comparison", "competitor relationships"

Source selection principles

  1. The user named a data source → use the specified source directly.
  2. Not named → select the best match from the table above by capability domain; judge for yourself based on the "capability boundary reference" below and the depth and scope of the user's question.
  3. For a simple query, select only one data source, and do not read the desc of other sources in parallel. Once the selected source returns successfully and has already covered the user's question, answer immediately; do not continue calling other APIs to supplement fields, reformat, or cross-validate. Only when the user explicitly requests cross-source comparison may you query a second data source.

Capability boundary reference (objective facts, consider when selecting sources)

  • yahoo_finance has at most 2 years of forex history;imf provides long-term exchange rate, CPI, GDP forecasts and balance of payments series
  • stock_finance_data quotes are real-time/closing snapshots; minute-level intraday series are in wind(also includes funds, bonds, and treasury yields)
  • Shareholder / institutional holdings:yahoo_finance、sec_edgar(13F)、sp_data(S&P standardized holders) are both covered, with different scopes and depth
  • world_bank_open_data is a historical macro series of over 50 years; for IMF forecast values use imf
  • gildata query input is natural language conditions (stock screening / fund screening / fund manager screening),tianyancha is corporate business registration records
  • wind the indexes/indicators parameter requires Wind native field names; for common fields like PE/PB/ROE/total market cap, first call wind_search_fields mapping (supports aliases and Chinese, one lookup at a time), do not guess field names

Unsupported capabilities: general web search / real-time news. When asked about these, tell the user the current data source does not cover them.

2. Standard workflow:get_data_source_desc → call_data_source_tool

The APIs available on the backend are often adjusted,this skill deliberately does not copy specific API names and parameter tables. Before each call you should ask the data source on the spot: "What interfaces do you have?"

1. 根据用户问题,从上表只挑一个 data_source_name
2. 执行 get_data_source_desc,读取该数据源的 Markdown 文档
3. 仔细读返回的 Markdown,里面列了:
     - 该数据源整体说明(含 ticker 格式、全局约束)
     - 每个 API 的描述 / 必填参数 / 可选参数 / 默认值 / 取值范围
4. 选最匹配的 API,按文档拼 params
5. 执行一次 call_data_source_tool;结果成功且已经覆盖问题时停止调用
6. 读返回结果,用用户提问时使用的语言回答

Example 1: User asks "Moutai's trend over the past year"

  1. Stock trend → stock_finance_data

  2. Call mcp__plugin-kimi-datasource_data__get_data_source_desc, parameter {"name":"stock_finance_data"}

  3. Find the "get historical prices" API from the documentation, see what it requires, such as ticker / start_date / end_date / file_path etc.

  4. Verify with web_search → Moutai = 600519.SH

  5. Call mcp__plugin-kimi-datasource_data__call_data_source_tool, parameters like {"data_source_name":"stock_finance_data","api_name":"<文档里写的 api>","params":{"ticker":"600519.SH","start_date":"...","end_date":"...","file_path":"/tmp/mao_1y.csv"}}

Example 2: User asks "find a few surveys on retrieval augmented generation"

  1. Paper search → arxiv(or scholar, arxiv is better for preprints, scholar has more complete citations)

  2. Call mcp__plugin-kimi-datasource_data__get_data_source_desc, parameter {"name":"arxiv"}

  3. Find the search-type API from the documentation, see what it requires, such as query / file_path / max_results etc.

  4. Execute call_data_source_tool

Example 3: User asks "who are ByteDance's shareholders"

  1. Corporate business registration → tianyancha

  2. Call mcp__plugin-kimi-datasource_data__get_data_source_desc, parameter {"name":"tianyancha"}

  3. Note: tianyancha's APIs are dynamically registered, the documentation will guide youfirst use a search-type interface to find the appropriate API name, then call it

  4. Must use the company's full name("Beijing ByteDance Technology Co., Ltd."), do not use the abbreviation. If you don't know the full name, first use the "company search" interface in the tianyancha documentation to look it up

3. Several iron rules before calling

3.1 Stock codes must be verified, never guess from memory

A-shares .SH/.SZ/.BJ, Hong Kong stocks .HK, US stocks .US etc. Users usually only say the Chinese name ("Moutai", "CATL", "Tencent") and won't give the code.

Before calling any stock-related API, first use web_search / WebSearch and similar online tools to confirm the correct code + suffix.

If the current environment has no online tools at all,have the user confirm the code themselves, do not guess. If wrong, the interface will silently return wrong data or empty data.

3.2 Company-related queries must use the full name

tianyancha rejects abbreviations like "Tesla", "NetEase", "Tencent", and must be given a full name like "Beijing Tesla Sales Co., Ltd.". If you don't know the full name, first call its company search API.

3.3 Most APIs require file_path

The vast majority of data source APIs write the complete result as CSV to file_path. Omitting it will report Missing required parameters: file_path. When you don't know what to pass, just give a /tmp/<场景>_<时间戳>.csv .

3.4 Don't pile too many tickers into one call

stock_finance_data real-time interfaces support at most 3 tickers, and historical interfaces at most 10. Exceeding this will be truncated or report an error. If there are more, call in batches.

4. How to read the returned results

call_data_source_tool 's stdout generally contains two sections:

  1. data_preview: CSV header + first few rows (usually 1~3 rows), convenient for you to directly answer simple questions
  2. CSV 数据已写入:/tmp/xxx.csv: full data output path

Strategy:

  • User only asks "how much is XX now", "what is China's 2023 GDP" and other single values → data_preview is generally enough, answer directly
  • User wants to plot, compare, calculate profit/loss, list items → use the Read tool to read the CSV and then process it
  • When querying mixed A-shares + Hong Kong stocks, the server will automatically split the CSV into _a.csv / _hk.csv two files, and the original file_path file does not exist

If the interface returns a failure, the prompt text generally states the reason (wrong parameters / unsupported / empty data, etc.). Feed the plain-language reason back to the user, don't force a second attempt.

5. watchlist.json — user's watchlist

${KIMI_SKILL_DIR}/watchlist.json is the user's watchlist. When the user asks "take a look at my watchlist", read this file, then follow the standard get_data_source_desc("stock_finance_data") → call_data_source_tool process to query real-time quotes; the real-time interfaces in the docs support at most 3 tickers per batch, call in batches if there are more.

Format:

[
  {"code": "600519.SH", "name": "贵州茅台"},
  {"code": "0700.HK", "name": "腾讯控股", "hold_cost": 350.5, "hold_quantity": 100}
]
  • code and name are required;hold_cost and hold_quantity are optional
  • When both are present, also calculate profit/loss:(当前价 - hold_cost) * hold_quantity
  • When the user says "help me add XX to my watchlist": first web_search to verify the code, then append to the JSON array

6. Notes

  • When answering the user, use the language the user used when asking. If the user asks in Chinese, answer in Chinese; if the user asks in English, answer in English; if they ask in another language, answer in that other language.
  • Don't guess stock codes / full company names from memory. A wrong code will make the interface silently return wrong data, and the user won't notice
  • Don't force-pass api_namewithout reading the desc. The backend will report API_NOT_FOUND. Unless in this session you have already read that data source's desc and remember the parameters
  • Don't give investment advice. After giving the data, just add a line "AI-generated, not investment advice"
  • If the error returned by a data source interface is clearly a backend bug (parameter schema self-contradictory, internal Python error, etc.),report the error to the user, don't force attempts— we can't fix this kind of bug on our side; it needs to be changed on the backend service side