Skip to main content
Glama
jun7680

Kakao Moment MCP

by jun7680

get_bizmoney

Retrieve advertising balance, recent 7-day spend trend, and estimated remaining days for Kakao Moment.

Instructions

비즈머니 잔액 + 최근 7일 소진 추이 + 현재 페이스 기준 잔여 일수 예상.

이런 질문에 사용하세요: • "비즈머니 얼마 남았어?" / "잔액 얼마야?" / "광고비 얼마 남았어?" • "이대로 가면 며칠 더 쓸 수 있어?" / "비즈머니 며칠치 남았어?" • "최근 일주일 광고비 얼마 썼어?" • "비즈머니 충전해야 해?" / "잔액 부족하지 않아?"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler: async function that fetches BizMoney balance from Kakao Moment API, calculates recent 7-day spend, and estimates days left. Returns dict with balance, free_cash, deferred_pay, spend data, and summary.
    async def get_bizmoney(client: KakaoMomentClient) -> dict[str, Any]:
        """비즈머니 잔액 + 최근 7일 소진 추이."""
        data = await client.get("/openapi/v4/adAccounts/balance")
        body = data.get("data") if isinstance(data, dict) and "data" in data else data
        if not isinstance(body, dict):
            return {"raw": data, "summary": "비즈머니 정보를 해석할 수 없습니다."}
    
        balance = body.get("cash") or body.get("balance") or body.get("totalAmount")
    
        # 최근 7일 소진 (오늘 제외 7일 전 ~ 어제). 광고계정 일별 리포트 사용.
        today = date.today()
        week_ago = today - timedelta(days=7)
        yesterday = today - timedelta(days=1)
        recent_spend: list[dict[str, Any]] = []
        weekly_total: float = 0.0
        try:
            report = await client.get(
                "/openapi/v4/adAccounts/report",
                params={
                    "dateFrom": to_yyyymmdd(week_ago),
                    "dateTo": to_yyyymmdd(yesterday),
                    "metricsGroups": "DAY",
                },
            )
            rows = report.get("data") if isinstance(report, dict) and "data" in report else report
            if isinstance(rows, list):
                for r in rows:
                    flat = _unwrap_metrics(r)
                    cost = float(flat.get("cost", 0) or 0)
                    weekly_total += cost
                    recent_spend.append(
                        {"date": flat.get("start") or flat.get("date"), "cost": cost}
                    )
        except Exception:  # noqa: BLE001 — 리포트 권한이 없는 경우에도 잔액은 반환
            recent_spend = []
    
        avg_daily = (weekly_total / len(recent_spend)) if recent_spend else 0.0
        days_left: float | None = None
        if balance and avg_daily > 0:
            try:
                days_left = round(float(balance) / avg_daily, 1)
            except (TypeError, ValueError):
                days_left = None
    
        summary_parts = [f"비즈머니 잔액 {_fmt_won(balance)}"]
        if recent_spend:
            summary_parts.append(f"최근 7일 평균 일소진 {_fmt_won(avg_daily)}")
        if days_left is not None:
            summary_parts.append(f"현재 페이스로 약 {days_left}일 잔여")
    
        return {
            "balance": balance,
            "free_cash": body.get("freeCash"),
            "deferred_pay_amount": body.get("deferredPayAmount"),
            "recent_spend_7d": recent_spend,
            "weekly_total_cost": round(weekly_total, 2),
            "avg_daily_cost_7d": round(avg_daily, 2),
            "days_left_estimate": days_left,
            "summary": " · ".join(summary_parts),
            "raw": body,
        }
  • Helper _fmt_won: formats a numeric amount as Korean won string (e.g., '1,234,567원'). Used by get_bizmoney for the summary.
    def _fmt_won(amount: float | int | None) -> str:
        if amount is None:
            return "-"
        try:
            return f"{int(round(float(amount))):,}원"
        except (TypeError, ValueError):
            return str(amount)
Behavior3/5

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

With no annotations provided, the description must convey behavioral aspects. It states the outputs but does not mention whether the operation is read-only, any authentication requirements, or data freshness. The description is functional but lacks depth in disclosing non-obvious behaviors.

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?

The description is exceptionally concise: two lines summarizing the core value followed by a compact list of example queries. Every sentence and example is purposeful, with no redundancy or filler.

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 lack of output schema and parameters, the description adequately covers the tool's purpose and typical questions. It does not specify output format or units, but for a simple query tool, the provided information is sufficient for an agent to understand and invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters with 100% coverage, meaning no additional documentation is needed. According to guidance, 0 parameters warrants a baseline of 4. The description adds no parameter info, but none is required.

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 tool provides three specific outputs: bizmoney balance, recent 7-day consumption trend, and remaining days estimate based on current pace. This distinguishes it from sibling tools like get_performance_report or get_today_status, which focus on different aspects of ad account data.

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 includes a list of example questions that map directly to common use cases, such as checking balance or estimating remaining days. While it does not explicitly state when not to use the tool, the examples provide strong contextual guidance for the AI agent.

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/jun7680/kakao-moment-mcp'

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