Skip to main content
Glama
ChunSam

kiwoom-mcp-server

by ChunSam

업종별 종목 시세 조회

get_sector_stocks

Retrieve stock quotes for a specific KRX sector by code or name, sorted by stock code, up to 100 stocks per page. Use for sector-based market analysis.

Instructions

특정 업종(KRX 표준 분류)에 속한 종목들의 시세를 조회합니다 (키움 ka20002). 종목코드순 정렬이며 첫 페이지(최대 100종목)만 가져옵니다. sector_code는 get_market_index의 업종 코드이거나 업종명이며 테마명은 받지 않습니다 — 사용자가 '테마'라고 물었으면 get_theme_groups로 코드를 찾아 get_theme_stocks를 쓰세요('반도체'처럼 이름이 겹칩니다).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo표시할 종목 수 (기본값 30, 최대 100)
sector_codeYes업종 코드 3자리(예: 001 코스피 종합, 101 코스닥 종합) 또는 업종명(예: 증권, 반도체). 이름이 여러 시장에 있으면 후보 코드를 알려 주는 에러가 돌아옵니다

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.34.0
    • changedInput schema / properties / sector_code / description
      Previous value: -"업종 코드 3자리 (예: 001 코스피 종합, 101 코스닥 종합 — get_market_index의 '코드' 값)"New value: +"업종 코드 3자리(예: 001 코스피 종합, 101 코스닥 종합) 또는 업종명(예: 증권, 반도체). 이름이 여러 시장에 있으면 후보 코드를 알려 주는 에러가 돌아옵니다"
    • addedInput schema / properties / sector_code / minLength
      Added value: +1
    • removedInput schema / properties / sector_code / pattern
      Removed value: -"^\\d{3}$"
  2. Addedv0.12.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full transparency burden. It discloses sorting, first-page-only behavior, the 100-stock limit, and the ambiguity error behavior. It stops short of specifying the returning data shape or authentication/rate constraints, so it is strong but not maximal.

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 one packed paragraph but has almost no filler: the first sentence states the main purpose, the second covers ordering and pagination, and the final sentence handles disambiguation and alternative tools. Every sentence provides actionable value.

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?

For tool selection, the description is complete enough: it tells the agent what to pass, how to resolve the only meaningful input ambiguity, and what behavior to expect. It does not declare the exact return fields in the absence of an output schema, which keeps it from scoring a 5.

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 schema already covers both parameters well (100% coverage), so this is above baseline. The description adds extra semantic context such as that sector_code can be either a 3-digit industry code or an industry name, cannot be a theme name, and that ambiguous names will produce an error. This improves over raw schema.

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 '조회' retrieves quotes for stocks belonging to a specific KRX sector, identifies the underlying operation (ka20002), and even differentiates from theme-based lookups by stating theme names are not accepted. This unmistakably distinguishes it from get_theme_stocks and other sector-related 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?

It gives explicit routing guidance: if the user asked about '테마', use get_theme_groups then get_theme_stocks; otherwise get_sector_stocks is applicable. It also defines that sector_code can be obtained from get_market_index, and warns about overlapping names like '반도체'.

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