Skip to main content
Glama
seolcoding

korean-stat-mcp

by seolcoding

aggregate_statistics

Aggregate Korean statistical data by grouping fields with functions like sum, mean, min, max, or count. Use stored data IDs for efficiency.

Instructions

통계 데이터를 그룹별로 집계합니다.

서버에 저장된 데이터(data_id) 또는 직접 전달된 데이터(data_json)를 사용합니다. data_id 사용 시 LLM 컨텍스트에 데이터를 포함하지 않아 효율적입니다.

Args: group_by: 그룹핑 필드 (쉼표로 여러 개 가능) 예: "C1_NM" 또는 "C1_NM,PRD_DE" agg_func: 집계 함수 "sum", "mean", "min", "max", "count" format: 응답 형식 ("summary" 또는 "raw") data_id: 저장된 데이터 ID (get_statistics_data 결과에서 확인) data_json: KOSIS 데이터 JSON 문자열 (data_id 없을 때 사용)

Returns: JSON 문자열: 집계된 데이터 (summary 형식이면 요약 포함)

Example: # 권장: data_id 사용 (서버에서 파일 읽음) >>> aggregate_statistics(group_by="C1_NM", data_id="20231213_abc12345")

# 대안: data_json 직접 전달
>>> aggregate_statistics(group_by="C1_NM", data_json=data)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNosummary
data_idNo
agg_funcNosum
group_byYes
data_jsonNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries full responsibility. It discloses that data_id avoids loading into LLM context and describes the return format. However, it does not confirm read-only behavior, potential side effects, authorization requirements, or rate limits. The behavioral disclosure is adequate but incomplete.

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: a one-sentence purpose, then usage notes, then a clean parameter list with examples. It is reasonably concise but the parameter descriptions could be more succinct (e.g., combining data_id and data_json explanation). Still, it is front-loaded and every sentence adds 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?

Given the complexity (5 params, output schema exists), the description covers parameters, return format, and an example. It explains the summary vs raw format. However, it does not address error cases (e.g., conflicting data sources, missing parameters) or edge cases like default values for agg_func and format. The output schema reliance is reasonable, but some gaps remain.

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 must compensate. It lists all parameters with detailed explanations: group_by supports comma-separated values, agg_func includes enumerated options (sum, mean, min, max, count), and explains the trade-off between data_id and data_json. This provides meaningful guidance beyond the bare schema.

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 it aggregates statistics by group, and explains the two data sources (data_id and data_json). However, it does not explicitly differentiate from sibling tools like get_statistics_data or filter_statistics, which may also involve grouping or aggregation. The purpose is clear but lacks sibling differentiation.

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 provides explicit guidance on when to use data_id (efficient, avoids context pollution) vs data_json, and includes an example. However, it does not specify when to prefer this tool over alternatives like browse_categories or filter_statistics, nor does it mention prerequisites or constraints (e.g., one of data_id or data_json should be provided).

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