Skip to main content
Glama
ChunSam

kiwoom-mcp-server

by ChunSam

대차거래 추이 조회

get_stock_lending

Retrieve stock lending info: view daily trends or top holdings by borrowed balance rank, stock …

Instructions

대차거래(주식 대여) 정보를 조회합니다 (키움 ka10068/ka20068/ka90012). view=trend(기본)은 일자별 추이 — 체결·상환·증감 주수와 대차잔고, 잔고금액을 시계열로 보여줍니다. stock_code를 지정하면 해당 종목, 생략하면 시장 전체 집계이고 기본 기간은 최근 30일입니다. view=balance_rank는 특정 하루의 대차잔고가 가장 많은 종목 순위입니다 — '어느 종목에 대차 물량이 쌓여 있나'를 물을 때 쓰고, 한 종목의 시간 흐름은 trend를 쓰세요. balance_rank는 시장 전체 횡단면이라 stock_code·from_date를 받지 않으며(주면 무시하고 각주로 알립니다), 기준일은 to_date로 지정합니다. 공매도 흐름과 함께 보려면 get_short_selling을 참고하세요.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoview=balance_rank의 표시 종목 수 (기본값 20, 최대 50)
viewNo조회 종류 (기본값: trend)
to_dateNo조회 종료일 (기본값: 오늘). view=balance_rank에서는 순위의 기준일입니다
from_dateNo조회 시작일 (기본값: 30일 전). view=balance_rank에서는 무시됩니다
stock_codeNo6자리 종목코드 (생략 시 시장 전체 대차 추이). view=balance_rank에서는 무시됩니다
Behavior5/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals defaults (trend view, last 30 days, market-wide aggregate if no stock_code), the ignored-parameter behavior with a footnote for balance_rank, and the interpretation of to_date as the base date for balance_rank. This goes beyond basic read-only implication and covers key edge cases.

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 a single dense paragraph but well-structured: it starts with the core purpose, then explains default behavior, then details the two views, and ends with a cross-reference. Every sentence contributes necessary information with no fluff or repetition, making it efficient and easy to parse.

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

Completeness5/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 views, multiple parameters, no output schema, no annotations), the description covers return content for trend (contracts, repayments, balance, etc.), the nature of balance_rank, parameter restrictions, defaults, and a pointer to a related tool. It provides enough context for an agent to select and invoke the tool correctly without additional documentation.

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?

The input schema already describes all 5 parameters with 100% coverage, so the baseline is 3. The description adds meaning by explaining the effect of omitting stock_code (market aggregate), the meaning of to_date for balance_rank, and that stock_code/from_date are ignored for balance_rank. This extra context justifies one point above baseline.

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 clearly states the tool provides stock lending information with two view modes: trend (daily time series) and balance_rank (cross-sectional ranking). It explicitly mentions the underlying Kiwoom API numbers and differentiates between the two views, and points to a sibling tool (get_short_selling) for related but different data, making its purpose unambiguous.

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?

It gives explicit when-to-use guidance: balance_rank for asking 'which stocks have accumulating lending volume' and trend for a single stock's time flow. It also states that stock_code/from_date are ignored for balance_rank and tells the user to consult get_short_selling for short selling flow, clearly distinguishing when to use this tool vs 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