get_ad_account_info
Retrieve Kakao Moment ad account information including name, status, business details, and balance shortage status.
Instructions
카카오모먼트 광고계정 정보(이름, 상태, 사업자, 잔액부족 여부 등)를 조회합니다.
이런 질문에 사용하세요: • "광고계정 상태 어때?" / "광고계정 정보 보여줘" • "지금 광고계정 잘 돌아가고 있어?" • "광고계정에 문제 있어?" / "잔액부족 상태야?" • "내 광고계정 ID/이름 뭐였지?"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Core handler: calls KakaoMomentClient.get('/openapi/v4/adAccounts/{ad_account_id}') and returns a dict with id, name, status, owner, summary, and raw body.
async def get_ad_account_info(client: KakaoMomentClient) -> dict[str, Any]: """광고계정 정보 (이름, 상태, 멤버 권한 등).""" data = await client.get(f"/openapi/v4/adAccounts/{client.ad_account_id}") body = data.get("data") if isinstance(data, dict) and "data" in data else data if not isinstance(body, dict): return {"raw": data, "summary": "광고계정 정보를 해석할 수 없습니다."} name = body.get("name") or "(이름 미상)" status = body.get("status") or body.get("config") or "-" return { "id": body.get("id") or body.get("adAccountId"), "name": name, "status": status, "owner": body.get("masterUserId") or body.get("ownerId"), "summary": f"광고계정 「{name}」 상태: {status}", "raw": body, } - Imports and module-level docstring for the tools/account module which contains get_ad_account_info. Uses KakaoMomentClient from kakao/client and _unwrap_metrics from reports.
"""광고계정/비즈머니/오늘 상태 조회 도구.""" from __future__ import annotations from datetime import date, datetime, timedelta from typing import Any from ..kakao.client import KakaoMomentClient from ..utils.dates import to_yyyymmdd from .reports import _unwrap_metrics - Helper _fmt_won used by other functions in the same file for formatting currency amounts.
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)