Skip to main content
Glama
minking
by minking

call_krx_api

Fetch raw JSON data from the official Korean Exchange (KRX) open API for stocks, indices, bonds, derivatives, and ETFs. The required API key is injected automatically.

Instructions

한국거래소(KRX) 공식 오픈API(openapi.krx.co.kr)를 호출하여 원본 JSON을 가공 없이 그대로 반환합니다. (KRX_API_KEY 자동 주입)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_idYesKRX 공식 31개 서비스 API ID 카탈로그: - 주식(8): stk_bydd_trd(코스피 일별매매), ksq_bydd_trd(코스닥 일별매매), knx_bydd_trd(코넥스), stk_isu_base_info(코스피 종목정보), ksq_isu_base_info(코스닥 종목정보), knx_isu_base_info, sw_bydd_trd(신주인수권증권), sr_bydd_trd(신주인수권증서) - ETP(3): etf_bydd_trd(ETF 일별매매), etn_bydd_trd(ETN), elw_bydd_trd(ELW) - 지수(5): krx_dd_trd(KRX시리즈), kospi_dd_trd(KOSPI지수), kosdaq_dd_trd(KOSDAQ지수), bon_dd_trd(채권지수), drvprod_dd_trd(파생상품지수) - 채권(3): kts_bydd_trd(국채전문), bnd_bydd_trd(일반채권), smb_bydd_trd(소액채권) - 파생상품(6): fut_bydd_trd(선물), opt_bydd_trd(옵션), eqsfu_stk_bydd_trd(주식선물유가), eqkfu_ksq_bydd_trd(주식선물코스닥), eqsop_bydd_trd(주식옵션유가), eqkop_bydd_trd(주식옵션코스닥) - 일반상품(3): gold_bydd_trd(금), oil_bydd_trd(석유), ets_bydd_trd(배출권) - ESG(3): sri_bond_info(사회책임투자채권), esg_index_info(ESG지수), esg_etp_info(ESG증권상품)
paramsNo요청 파라미터 객체 (예: basDt: "20240315", isin: "KR7005930003", isuCd: "005930" 등)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It discloses that the tool returns raw JSON without processing and that the API key is auto-injected. However, it doesn't disclose potential failure modes (e.g., what happens if the API returns an error, rate limits, or whether the tool validates parameters). The description adds some behavioral context but not comprehensive transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded: the main purpose is stated in the first sentence, and the API key injection note is a useful addition. The api_id catalog is long but necessary for a tool with 31 possible values. The structure is clear, though the catalog could arguably be moved to the schema (it already is partially there). Overall, every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (31 API IDs, nested params object, no output schema), the description is fairly complete. It explains the raw return behavior and key injection. However, it doesn't mention error handling, response format details, or how to discover valid param values for each API ID. Since there's no output schema, a bit more about the return shape could help, but the 'raw JSON' statement covers the basics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters. The description adds value by explaining the api_id catalog in detail (31 service IDs with Korean labels) and giving examples for params. This goes beyond the schema's basic descriptions, helping an agent understand what values to pass. The description doesn't repeat the schema verbatim but enriches it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('호출하여'), a specific resource (KRX 공식 오픈API), and a clear behavior (원본 JSON을 가공 없이 그대로 반환). It also mentions automatic API key injection, which distinguishes it from sibling tools like call_dart_api. The description is unambiguous and tells an agent exactly what this tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool: when you need raw KRX open API data without transformation. It doesn't explicitly state when not to use it or name alternatives, but the sibling list (call_dart_api, download_dart_document, search_corp_code) makes the context clear. The description could be stronger by explicitly saying 'use this for KRX data, not DART data', but the resource is clearly identified.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.