Skip to main content
Glama

FarmTempo

calculate_margin

Read-onlyIdempotent

단일 품목의 원가(직납가)와 판매가로부터 원가율·마진율·마진액·자연어 평가를 반환합니다. 마트 영업 미팅·발주서 작성·B2AI 자동 발주 권고에 활용.

파라미터

  • cost_price (query, required): 직납가 / 원가 (KRW)

  • sell_price (query, required, >0): 판매가 (KRW)

  • item_name (query, optional): 품목명 (한글, 응답에 echo)

assessment 임계값

  • ≥30% → '양호'

  • 15-30% → '보통'

  • <15% → '낮음 — 가격 재검토 권장'

Returns single-item margin/cost rate with natural-language assessment.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cost_price": "<cost_price>",
      "sell_price": "<sell_price>"
    },
    "name": "calculate_margin"
  }
}

Input Schema

NameRequiredDescriptionDefault
item_nameNo
cost_priceYes
sell_priceYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, so the safety profile is covered. Beyond that, the description discloses the assessment decision thresholds (≥30% 양호, 15-30% 보통, <15% 낮음) and the sell_price > 0 constraint, which genuinely tells the agent how output is derived. It does not say what happens when sell_price is 0 or negative.

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?

Front-loaded purpose sentence followed by scannable parameter and threshold sections. Minor redundancy: the closing English sentence restates the opening Korean sentence without adding information, so it does not fully earn its place.

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?

With an output schema present, the description need not enumerate return fields, and the threshold table plus parameter docs make it callable confidently. The only gaps are edge-case handling (zero/negative sell_price, negative margin) and the batch-vs-single routing, which keep it from being fully 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%, so the description must compensate, and it does: every parameter is listed with type, required status, units (KRW), domain meaning (직납가/원가, 판매가), the >0 constraint, and the echo behavior for item_name. This adds meaning the bare schema titles cannot supply.

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?

States a specific verb and resource: it computes 원가율·마진율·마진액 plus a natural-language assessment from cost price and sell price for a single item. The explicit '단일 품목' scoping distinguishes it from the sibling calculate_margin_bulk without needing to open either 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?

Gives concrete triggering contexts (마트 영업 미팅, 발주서 작성, B2AI 자동 발주 권고), which tells an agent when to reach for it. It stops short of an explicit exclusion or a pointer to calculate_margin_bulk for multi-item cases, so routing for batch scenarios is left to inference.

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