Skip to main content
Glama
kwonsw812

kiwoom-mcp

by kwonsw812

get_stock_chart

Read-only

Retrieve daily OHLCV chart data for Korean stocks by stock code and date, displaying recent data first for analysis.

Instructions

기준일자 기준 일봉 OHLCV 차트 데이터를 조회합니다 (최근 데이터부터 내림차순)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stock_codeYes종목코드 (예: 005930)
base_dateNo기준일자 (이 날짜 이전 데이터 조회) (YYYYMMDD 형식)

Implementation Reference

  • The underlying method that performs the API request to fetch stock chart data.
    async getStockChart(stockCode: string, baseDate: string) {
      return this.request("/api/dostk/chart", "ka10081", {
        stk_cd: stockCode,
        base_dt: baseDate,
        upd_stkpc_tp: "1",
      });
    }
  • src/index.ts:578-595 (registration)
    The MCP tool definition and handler logic for "get_stock_chart".
    // 5. get_stock_chart - 일봉 차트 (ka10081)
    server.tool(
      "get_stock_chart",
      "기준일자 기준 일봉 OHLCV 차트 데이터를 조회합니다 (최근 데이터부터 내림차순)",
      {
        stock_code: stockCodeSchema,
        base_date: dateSchema("기준일자 (이 날짜 이전 데이터 조회)").optional(),
      },
      { readOnlyHint: true },
      async ({ stock_code, base_date }) => {
        try {
          const data = await client.getStockChart(stock_code, base_date ?? today());
          return textContent(formatChartData(data));
        } catch (error) {
          return errorContent(formatError(error));
        }
      }
    );
Behavior3/5

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

The description adds some behavioral context beyond annotations: it specifies that data is sorted in descending order by recent data and that base_date filters for data before that date. The annotation (readOnlyHint: true) already indicates this is a safe read operation, so the description doesn't need to reiterate safety. However, it doesn't disclose other behavioral traits like rate limits, authentication needs, or what happens if no data exists for the given parameters.

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, efficient sentence that conveys the core functionality without unnecessary words. It's front-loaded with the main purpose and includes key details (sorting order and date filtering). However, it could be slightly improved by explicitly mentioning the tool's scope relative to siblings.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, read-only operation), the description is adequate but has gaps. It covers the basic purpose and data ordering, but lacks output details (no output schema is provided, so the description doesn't explain return values like OHLCV structure or pagination). With annotations covering safety, it's minimally viable but could benefit from more context on usage and results.

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?

The schema description coverage is 100%, meaning both parameters (stock_code and base_date) are fully documented in the schema with descriptions and patterns. The description adds minimal value beyond the schema: it clarifies that base_date is used to retrieve data before that date ('이 날짜 이전 데이터 조회'), which is somewhat redundant with the schema's description. No additional parameter semantics are provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: retrieving daily OHLCV chart data for a stock, sorted by recent data first. It specifies the verb ('조회합니다' - retrieves/checks) and resource ('일봉 OHLCV 차트 데이터' - daily OHLCV chart data). However, it doesn't explicitly differentiate from sibling tools like 'get_stock_price' or 'search_stock', which might offer similar or overlapping functionality.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It mentions the base_date parameter for filtering data before a specific date, but doesn't explain how this differs from other stock-related tools like 'get_stock_price' (which might provide current price) or 'search_stock' (which might search for stocks). There are no explicit when-to-use or when-not-to-use instructions.

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/kwonsw812/kiwoom-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server