Skip to main content
Glama
ChunSam

kiwoom-mcp-server

by ChunSam

외국인 보유 추이 조회

get_foreign_holding

Query foreign holding trends per stock — daily net change, shares held, ratio, limit exhaustion — or market rankings by limit surge, cumulative net buying, and 3-day streaks.

Instructions

외국인 보유(한도) 동향을 조회합니다 (키움 ka10008/ka10036/ka10034/ka10035). stock_code를 주면 그 종목의 일자별 추이 — 종가·거래량·외국인 순변동수량·보유주식수·보유비중·한도소진률. stock_code 없이 rank를 주면 시장 전체 순위입니다: limit_surge(한도소진율이 가장 많이 오른 종목)/period_net(기간 누적 순매매 상위)/streak(3일 연속 같은 방향으로 순매매한 종목 — 누적 크기가 아니라 방향의 지속성을 볼 때). 이 tool은 전부 외국인 보유·한도 계열이라, 투자자 매매 기준인 get_net_buy_rank·get_investor_trend·get_foreign_intraday와는 데이터 소스가 다릅니다(같은 종목에서 부호가 반대일 수 있음).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNorank 모드에서 표시할 종목 수 (기본 20, 최대 100)
daysNo기준 기간(거래일) — limit_surge는 1/5/10/20 (기본 5), period_net은 1/3/5/10/20/60/120 (기본 20). streak는 3일 고정이라 이 값을 받지 않습니다
rankNo시장 전체 순위 종류 — limit_surge(한도소진율 증가 상위)/period_net(기간 누적 순매매 상위)/streak(3일 연속 같은 방향 순매매). stock_code를 생략할 때 씁니다
limitNo종목 추이 모드에서 표시할 일수 (기본 15, 최대 50; 최신순)
marketNo시장 구분 — rank 모드에서만 사용 (기본값 all)
directionNoperiod_net·streak 방향 — net_sell(순매도, 기본)/net_buy(순매수)
stock_codeNo조회할 6자리 종목코드 — 주면 종목 추이 모드
Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses both operational modes, the output fields (close, volume, foreign net change, owned shares, ratio, limit exhaustion), and the important caveat that the data source differs from investor-trade tools and signs may be reversed. This goes well beyond a basic statement of function.

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

Conciseness5/5

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

The description is concise despite covering two modes and ranking subtypes. It front-loads the primary purpose, uses bold for key distinctions, and each sentence adds essential information without fluff. It is appropriately sized for the tool's complexity.

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 (7 optional parameters, two modes, no output schema or annotations), the description covers the main use cases, mode selection, and data source caveats. It doesn't specify the exact ranking output format (e.g., whether it includes stock names/codes), but the description is sufficiently complete for an agent to select and invoke the tool correctly.

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

Parameters5/5

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

Schema coverage is 100% and parameter descriptions are already detailed, but the description adds critical semantic context: how stock_code and rank interact, which day values apply to which rank mode (limit_surge: 1/5/10/20; period_net: 1/3/5/10/20/60/120; streak: fixed 3 days), and that market/direction apply only in rank mode. This meaningfully exceeds what the schema alone provides.

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?

Clearly states the tool queries foreign ownership/limit trends with two distinct modes: per-stock daily trend and market-wide rankings. The description distinguishes it from sibling tools (get_net_buy_rank, get_investor_trend, get_foreign_intraday) by noting the different data source, so it's specific and well-differentiated.

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

Usage Guidelines5/5

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

Explicitly explains when to use stock_code (per-stock trend) vs rank (market-wide rankings) and details each rank type (limit_surge, period_net, streak) with their specific criteria. It also states the tool should be used for foreign ownership/limit data and not as a substitute for investor-trade-based tools, providing explicit exclusions and alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChunSam/kiwoom-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server