Skip to main content
Glama

FarmTempo

get_wholesale_prices

Read-onlyIdempotent

v2 신설 — 5대 원칙 #4 데이터 정규화 핵심 엔드포인트. 9개 핵심 품목(배추·무·양파·대파·마늘·오이·감자·생고추·토마토)의 도매가를 품목당 1행 단일 스키마로 반환합니다.

호출 메커니즘

  • KAMIS dailyPriceByCategoryList (도매: p_product_cls_code=02) 카테고리 200·100 두 번 호출 · 국가코드 비움 = 조사 도매시장(최대 5곳) 평균

  • 각 품목의 (item_code, kind_code, rank_code) 매칭으로 단일 행 추출

  • 도매 매칭 실패 품목은 dailySalesList(소매)로 자동 fallback

핵심 필드

  • today, yesterday: 도매가 (KRW, KAMIS 단위 기준)

  • unit: KAMIS 도매시장 표준 단위 (예: '10kg', '100개')

  • kg_per_unit: 단위→kg 환산 계수 (품목 간 비교용)

  • krw_per_kg: kg당 단가 (KRW/kg) — 품목 간 직접 비교 가능한 정규화 가격

  • kg_conversion_note: 환산 근거 자연어 설명 (LLM 컨텍스트용)

  • price_basis: "wholesale" (도매 성공) / "retail_fallback" (소매 대체)

  • as_of: 실제 가격 기준일 (도매시장 마감 전이면 전일)

  • kamis_item_code, kamis_kind_code, kamis_kind_name, kamis_rank: 출처 추적용 메타필드

  • coverage: 9품목 중 도매/소매 fallback/누락 분포

/api/prices와의 차이

  • /api/prices: 소매가, 다중 단위 중복 가능 (대시보드 호환용)

  • /api/prices/wholesale: 도매가, 9품목, 정규화된 단일 스키마 (LLM/AI용)

Returns normalized wholesale prices (1 row per item) for 9 core items. Falls back to retail when wholesale unavailable (price_basis indicates source).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_wholesale_prices"
  }
}

Input Schema

NameRequiredDescriptionDefault
regdayNo조회 기준일 (YYYY-MM-DD). 미지정 시 오늘. 도매시장 마감 전이면 dpr2(전일) 자동 fallback.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

With read-only/idempotent annotations already covering the safety profile, the description adds substantial behavior beyond them: an automatic retail fallback when wholesale matching fails, an `as_of` rule that reverts to the previous day before market close, a `price_basis` discriminator for which source was used, and a `coverage` distribution over the 9 items. This is exactly the kind of non-obvious mutation/fallback semantics an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The header sections are organized and the field list is genuinely useful, but the 'call mechanism' block drills into KAMIS endpoint codes and category-200/100 call counts that an agent cannot act on. The one-sentence English summary that would be the best lead is placed last, and the body is bilingual, diluting front-loading.

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?

There is no output schema, yet the description documents every returned field (`today`, `yesterday`, `unit`, `kg_per_unit`, `krw_per_kg`, `kg_conversion_note`, `price_basis`, `as_of`, KAMIS metadata, `coverage`), which fully compensates. For a single-optional-param read tool with annotations, nothing an agent needs to call or interpret it is missing.

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?

Schema coverage is 100% and the single `regday` parameter already carries its format and the previous-day fallback rule in the schema itself. The description adds essentially no parameter-level meaning beyond that, so the baseline 3 applies even though the parameter is well handled overall.

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 names the exact resource (wholesale prices for 9 named core items) and the exact output shape (one row per item, single normalized schema). It also explicitly contrasts itself with `/api/prices` (retail, multi-unit, dashboard-oriented) versus `/api/prices/wholesale` (wholesale, normalized, LLM/AI-oriented), so an agent can distinguish the two without opening a schema.

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 definition clearly frames the tool's intended use — cross-item comparison via `krw_per_kg` — and explains why it exists separately from the retail endpoint. It stops short of naming concrete sibling tools (e.g. compare_my_price_vs_wholesale, usda_prices) or stating when NOT to call it, so routing guidance is strong but not exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources