Skip to main content
Glama
seolcoding

korean-stat-mcp

by seolcoding

get_statistics_data

Fetch actual statistical data from KOSIS by table ID, organization, and date range. Get a summary with metadata, pivot, and preview, or request raw data.

Instructions

KOSIS에서 통계 데이터를 조회합니다.

search_statistics나 get_table_metadata로 확인한 테이블의 실제 데이터를 가져옵니다.

Args: org_id: 기관 ID (예: "101") tbl_id: 테이블 ID (예: "DT_1B040A3") start_date: 시작 기간 (예: "2019", "202301") end_date: 종료 기간 (예: "2023", "202312") prd_se: 기간 유형 "Y"=연간, "M"=월간, "Q"=분기, "S"=반기 format: 응답 형식 "summary" (기본): LLM 친화적 요약 형식 (메타데이터 + 피벗 요약 + 샘플) "raw": 전체 원본 데이터 (주의: 컨텍스트 초과 가능) new_est_prd_cnt: 최근 N개 시점만 반환 (선택). KOSIS newEstPrdCnt 매핑. 예: 5 → 가장 최근 5개 기간만. start_date/end_date를 자동 제한하므로 "최근 5년만" 같은 자연어 쿼리에 직접 사용. prd_interval: 기간 stride (선택). KOSIS prdInterval 매핑. 예: prd_se="Y" + prd_interval=2 → 격년 데이터.

Returns: format="summary" (기본): { "summary": { "total_records": 850, "period_range": "2019~2023", "dimensions": ["행정구역별"], "items": ["인구수"] }, "metadata": { "tbl_id": "DT_1B040A3", "tbl_nm": "행정구역별 인구수", "org_nm": "통계청", "unit": "명" }, "pivot_summary": { "by_period": {"2019": 51849861, "2023": 51558034}, "by_c1": {"경기도": 68123456, "서울특별시": 47056789, ...} }, "data_preview": [최근 기간 샘플 50건], "available_values": { "PRD_DE": ["2019", "2020", "2021", "2022", "2023"], "C1_NM": ["서울특별시", "부산광역시", ...] } }

format="raw": 전체 API 응답 (배열 형태)

Example: >>> get_statistics_data("101", "DT_1B040A3", "2019", "2023") >>> get_statistics_data("101", "DT_1B040A3", "2019", "2023", format="raw")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNosummary
org_idYes
prd_seNoY
tbl_idYes
end_dateYes
start_dateYes
prd_intervalNo
new_est_prd_cntNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description fully discloses behaviors: explains two response formats (summary vs raw), warns about context size for raw, and describes how new_est_prd_cnt limits periods. It does not mention authentication or error handling but is thorough for a read-only data retrieval tool.

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 well-structured with Args and Returns sections, and front-loaded with purpose. The Returns section is verbose with a full JSON example, which aids clarity but could be trimmed. Overall, it is appropriately sized for a complex tool.

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 (8 parameters, nested output), the description covers all aspects: purpose, prerequisites, parameter details, return formats, and examples. It lacks error handling and edge cases but is otherwise complete.

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 description coverage is 0%, but the description compensates fully with detailed parameter explanations, including examples, default values, and mapping to KOSIS concepts (e.g., prd_se values, newEstPrdCnt). This adds significant meaning beyond the bare 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 verb '조회' (query) and the resource '통계 데이터' (statistical data) from KOSIS. It explicitly distinguishes from sibling tools like search_statistics and get_table_metadata by indicating that this tool retrieves actual data from tables identified by those tools.

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 guides when to use by stating it works after search_statistics or get_table_metadata. It provides examples and parameter details. However, it does not explicitly mention when not to use or alternatives among siblings like filter_statistics or aggregate_statistics.

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/seolcoding/korean-stat-mcp'

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