Skip to main content
Glama
ChunSam

kiwoom-mcp-server

by ChunSam

거래원 동향 조회

get_broker_activity

Check broker branch trading activity: see top 5 securities firms buying/selling a stock, which brokers exited its top list and when, or rank stocks by foreign-broker net buying across the market.

Instructions

증권사 창구별 매매 동향을 조회합니다 (키움 ka10002/ka10102/ka10037/ka10038/ka10053). stock_code를 주면 그 종목의 당일 거래원 상위 5개사(매수/매도)이고, 외국계 창구에는 🌐를 붙입니다. 같은 종목을 view=broker_rank로 부르면 전 거래원 50개사의 누적 순위를 순매수/순매도로 갈라 보고, view=dropout이면 당일 상위에서 빠진 창구와 그 시각을 봅니다(누가 언제 발을 뺐는지). stock_code를 생략하면 시장 전체에서 외국계 창구 순매매가 큰 종목 순위입니다 (direction: net_buy 기본/net_sell/all, days: 1·5·10일 누적). 둘 다 창구 기준이라 투자자 주체별 순매수와는 다릅니다 — 외국인 순매수 자체는 get_investor_trend나 get_foreign_intraday를 쓰세요.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNo표시할 개수 — 시장 전체 순위는 종목 수(기본 20), view=broker_rank는 거래원 수(기본 100 = 50개사 전부). 최대 100
daysNo누적 기간(거래일) — 시장 전체 순위에서만 사용 (기본값 1)
sortNo정렬 기준 — amount(순매매 금액, 기본)/quantity(순매매 수량)
viewNostock_code를 줬을 때의 표 종류 — top5(당일 상위 5개사, 기본)/broker_rank(전 거래원 50개사 누적 순위)/dropout(당일 상위에서 이탈한 창구와 그 시각)
marketNo시장 구분 — 시장 전체 순위에서만 사용 (기본값 all)
directionNo순매매 방향 — 시장 전체 순위에서는 net_buy(기본)/net_sell/all(종목코드 순, 순위 아님), view=broker_rank에서는 볼 거래원 집합 net_buy(순매수한 곳)/net_sell(순매도한 곳)/all(전체, 기본)
stock_codeNo조회할 6자리 종목코드 — 주면 종목별 거래원, 생략하면 시장 전체 외국계 창구 순위
Behavior5/5

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

With no annotations, the description fully carries the burden and does so richly: it explains the two modes (stock_code present vs absent), the different return shapes for each view (top 5 brokers, cumulative 50-broker ranking, dropped brokers with times), the 🌐 flag for foreign brokers, and how direction/days parameters affect the result. It also explicitly warns that the data is broker-based, not investor-based, preventing misuse. This is thorough behavioral disclosure.

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 a single dense paragraph, but every sentence adds value. It front-loads the core purpose and uses formatting (bold, line breaks implied) to highlight key terms. It could be better structured with bullet points for the three views, but given the complexity of the behavior, the length is justified and there is no fluff.

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 (two modes, multiple views, optional parameters), the description covers the most important behavior and result types. It doesn't list exact output fields (e.g., whether it returns arrays of objects with specific fields), but the absence of an output schema means the description should compensate; it does so sufficiently for an agent to understand what data to expect, though more detail on the return structure would make it fully complete.

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?

Although the schema documents all parameters with descriptions (100% coverage), the description adds crucial semantic context beyond them: stock_code presence switches the entire result mode, top means different things depending on view (number of stocks vs number of brokers), direction has different defaults/effects in market-wide vs broker_rank modes, and days only applies to market-wide mode. This adds meaning that the schema alone does not convey.

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 precisely states the tool's purpose: querying securities firm window trading trends ('증권사 창구별 매매 동향을 조회합니다'), and immediately differentiates it from investor-trend tools by emphasizing '창구 기준' (broker-based). It also distinguishes between the two modes (with/without stock_code) and mentions specific view types (top5, broker_rank, dropout), making it clear what the tool does and how it differs from siblings.

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?

Explicit guidance is provided: use view=top5 for daily top 5, broker_rank for cumulative ranking across all 50 brokers, dropout for brokers that fell off the top. It also explains when to omit stock_code for market-wide foreign broker rankings, and even names alternatives (get_investor_trend, get_foreign_intraday) for foreign net buying by investor type, plus the key distinction that this tool is broker-based. This is exemplary usage guidance.

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