Skip to main content
Glama
Johnhyeon

StockLens

by Johnhyeon

get_market_cap_ranking

Read-onlyIdempotent

Fetch market-cap ranking lists for KOSPI or KOSDAQ. Supports pagination to get any rank range, such as top 50 or 301–400, for market analysis.

Instructions

시가총액순위 — 시가총액 상위 종목을 가져옵니다. "대형주", "시가총액 TOP", "코스피 대장주", "코스닥 전 종목 시총" 같은 질문에 사용합니다.

결과 머리말에 시장 전체 종목 수와 이 표의 순위 범위("전체 1,820개 중 1~50위")가 나옵니다. 501위 아래도 받을 수 있습니다 — count 개씩 나눈 쪽을 page로 고릅니다.

  • 시장 전체: count=500 으로 page=1, 2, … 를 꼬리말에 "다음 쪽"이 없을 때까지. (2026-09 기준 KOSPI 약 950개 = 2쪽, KOSDAQ 약 1,800개 = 4쪽)

  • 특정 순위 구간: 예) 301~400위 = count=100, page=4. 쪽은 같은 순간의 목록에서 자릅니다(장중 1분 캐시). 장중에 몇 분 넘게 띄워 받으면 그 사이 순위가 바뀌어 경계 종목이 겹치거나 빠질 수 있습니다.

⚠️ 순위표에는 주식만 있는 게 아닙니다. 리츠·인프라펀드·상장 펀드·외국기업(DR 포함) 행이 같은 순위에 섞여 있고, 거래정지 종목도 들어 있습니다. 해당 행은 '구분' 열에 표시되고, 시장 전체의 구분별 개수는 결과 끝에 나옵니다. "상장 기업 수"처럼 주식만 셀 때는 그 개수를 쓰세요.

Args: market: "KOSPI" / "KOSDAQ" (기본 KOSPI, ALL 미지원) count: 한 번에 받을 종목 수 (기본 50, 최대 500) page: count 개씩 나눈 몇 번째 쪽인가 (기본 1). page=2, count=500 이면 501~1000위.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
countNo
marketNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.1.3
    • removedInput schema / properties / count / default
      Removed value: -50
    • removedInput schema / properties / market / default
      Removed value: -"KOSPI"
    • addedInput schema / properties / page
      Added value: +{
      +  "title": "Page",
      +  "type": "integer"
      +}
  2. First observedv0.4.0

TDQS

A4.7/5.0
Behavior5/5

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

The annotations already establish read-only, idempotent, non-destructive behavior, and the description adds substantial non-obvious context: the result head shows total market count and rank range, there is a 1-minute intraday cache, rank boundaries can shift causing overlaps/gaps, and the ranking includes non-stock rows such as REITs, funds, DRs, and halted stocks with a '구분' column and per-type counts. This is exactly the kind of behavioral disclosure agents need.

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 long but information-dense and well structured: purpose, example queries, result notes, pagination strategy, caveats, and Args. It is front-loaded with purpose and each paragraph earns its place, though the pagination/caching sections could be tightened slightly without losing essential detail.

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 minimal schema descriptions and a complex paginated ranking tool, the description is remarkably complete. It explains how to get the whole market, how to fetch a specific rank band, how to read the head/tail counts, what non-stock rows mean, and how the cache affects results. An output schema exists, so not re-listing return fields is acceptable.

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 0%, so the description has the full burden for parameter semantics, and it fully delivers. It documents market values with defaults and exclusions, count with default and maximum, and page with a concrete mapping example ('page=2, count=500 이면 501~1000위'). No parameter is left ambiguous.

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 opens with '시가총액순위 — 시가총액 상위 종목을 가져옵니다', a specific verb+resource statement identifying the tool as a market-cap ranking fetcher. It also gives concrete example queries ('대형주', '시가총액 TOP', '코스피 대장주') that make its purpose immediately clear and distinguish it from sibling ranking tools like get_volume_ranking and get_change_ranking.

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

Usage Guidelines4/5

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

The description gives clear usage guidance: example phrases, how to paginate for the full market versus a specific rank band, and an explicit exclusion ('ALL 미지원'). It does not explicitly name sibling alternatives to prefer instead, but the examples and market-cap framing make intended use clear enough.

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