Skip to main content
Glama
ChunSam

kiwoom-mcp-server

by ChunSam

투자자별 매매동향 조회

get_investor_trend

Retrieve individual, foreign, and institutional net buying trends for a stock over a period and by recent trading days. Specify dates and unit to analyze cumulative flows and daily details.

Instructions

종목의 개인/외국인/기관 순매수 동향을 조회합니다 (키움 ka10059+ka10061). 기간 합계와 최근 거래일별 내역을 함께 보여줍니다. unit: amount(금액, 백만원, 기본)/quantity(수량, 주). 같은 일자에 종가·거래량·프로그램·신용비율까지 한 행으로 묶어 보려면 get_daily_trading(view=flow), 기관·외국인이 담은 추정평균단가는 get_institution_trend, 주체를 정해 종목을 찾을 때는 get_net_buy_rank를 쓰세요. 종목코드를 모르면 search_stock으로 먼저 찾으세요.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitNo단위 (기본값: amount=백만원)
to_dateNo합계 기간 종료일 (기본값: 오늘)
from_dateNo합계 기간 시작일 (기본값: 30일 전)
stock_codeYes6자리 종목코드 (예: 005930)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool returns both period totals and recent daily records, and mentions the 'unit' parameter. However, it does not explicitly confirm read-only behavior, mention rate limits, or describe error handling or data freshness. While not contradictory, it lacks deeper behavioral context for a query tool beyond its basic 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 a single paragraph but densely packed with useful information: purpose, output content, unit explanation, alternative tools, and fallback for unknown code. Each sentence serves a distinct purpose, and there is no fluff. The structure is logical and front-loaded with the core purpose, making it easy to scan.

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 (4 parameters, no output schema, no annotations), the description is quite complete. It explains output (period totals and daily records), unit choices, and provides clear usage guidance. However, since there is no output schema, it could have elaborated on the exact fields returned (e.g., columns for each investor type), but it covers the essential functionality well.

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

Parameters3/5

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

Schema description coverage is 100%, and the schema already provides clear descriptions for all parameters (e.g., unit default, date formats). The description adds minimal extra meaning, such as clarifying that 'unit' values are amount (million won, default) and quantity. Since the schema is already comprehensive, the description is adequate but does not significantly enhance parameter understanding.

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's purpose: to query net buying trends by investor type (individual/foreign/institution) for a stock, and differentiates it from sibling tools by explicitly naming alternatives (get_daily_trading, get_institution_trend, get_net_buy_rank). The verb '조회' (query) and resource '종목' (stock) are specific, and it includes API codes for precision.

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?

The description provides explicit guidance on when to use this tool versus alternatives, including specific cases: 'get_daily_trading(view=flow)' for daily trading details with close/volume/program/credit, 'get_institution_trend' for estimated average cost, and 'get_net_buy_rank' for finding stocks by market participant. It also directs users to 'search_stock' if the stock code is unknown. This is exemplary differentiation.

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