Skip to main content
Glama

get_train_run_history

Query KORAIL train run history by date, train number, or station (name/code), with an option to deduplicate records.

Instructions

차세대예약발매 열차 운행내역 조회 (2024-01-01 단일 일자 100건 스냅샷).

※ 데이터 한계 (반드시 참고):

  • 이 데이터는 2024-01-01 하루치만 존재. 다른 날짜 필터 시 0건 반환.

  • 실제 하루 운행 열차는 수백 편이나, 이 스냅샷은 일부 열차·역 포함.

  • 동일 (열차번호, 역)이 2건씩 중복 등장하는 경우 있음 (경유 처리 방식).

  • 정차 순번 필드 없음 → 정확한 정차 순서는 get_train_run_info 또는 get_train_run_plan으로 교차 확인 필요.

  • 역코드 상세 정보(영문명·지역본부 등)는 korail-codebook의 decode_station_code 도구로 조회 가능.

파라미터:

  • run_dt: 운행일자 (YYYY-MM-DD, 예: '2024-01-01')

  • trn_no: 열차번호 (예: '6' 또는 '00006', 숫자 자동 변환)

  • stn_nm: 한글역명 부분일치 (예: '서울', '부산')

  • stn_cd: 역코드 정확일치 (예: '3900023')

  • dedupe: True 시 동일 (열차번호+역코드) 중복 레코드 제거 (기본 False)

반환 필드: 운행일자(RUN_DT), 열차번호(TRN_NO), 역코드(STN_CD), 한글역명(KOR_STN_NM)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dedupeNo
run_dtNo
stn_cdNo
stn_nmNo
trn_noNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A5/5.0
Behavior5/5

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

No annotations are present, so the description carries full responsibility. It thoroughly discloses data limitations (only 2024-01-01, partial coverage), duplicate records, missing stop order, and the dedupe parameter to handle it. This is exemplary transparency.

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?

Despite its length, the description is well-structured with clear sections, bullet points for caveats, and a parameter list. It front-loads the most critical limitation (single date) and every sentence adds value. No redundancy.

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 complexity (multiple parameters, data caveats, alternative tools, return fields), the description is complete. It also lists return fields and explicitly mentions the output schema is available. Nothing an agent needs is missing.

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 has zero description coverage, but the description explains every parameter (run_dt, trn_no, stn_nm, stn_cd, dedupe) with formats, examples, and default behavior. It fully compensates for the schema gap.

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 it queries train operation history (열차 운행내역) for a specific date, and distinguishes itself from siblings by noting that exact stop order should be obtained via get_train_run_info or get_train_run_plan. The resource and scope are 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?

Explicitly warns about the single-date snapshot, partial data, duplicates, and lack of stop order, while directing the agent to alternative tools for stop ordering and station code decoding. This is precise when-to-use and when-not-to-use guidance.

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

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/lovelyquality/korail-mcp'

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