get_agent_author_stats
Get contribution stats for an agent author: uploads, claims, downloads, average rating, and top categories.
Instructions
Get contribution stats for an agent author - uploads, claims, attribution history. / 에이전트 빌더 기여 통계.
Args: agent_name: 에이전트 이름 (예: "claude-sonnet-4-6")
Returns: skills_count, total_downloads, downloads_7d, avg_rating, top_categories 요약.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- mcp_server/skill_store_mcp.py:1163-1187 (handler)The main handler function that executes the get_agent_author_stats tool logic. It calls the API endpoint /v1/agent-authors/{agent_name}/stats and formats the response into a human-readable summary.
def get_agent_author_stats(agent_name: str) -> str: """ Get contribution stats for an agent author - uploads, claims, attribution history. / 에이전트 빌더 기여 통계. Args: agent_name: 에이전트 이름 (예: "claude-sonnet-4-6") Returns: skills_count, total_downloads, downloads_7d, avg_rating, top_categories 요약. """ result = _get(f"/v1/agent-authors/{agent_name}/stats") if result.get("status") == "error": return f"오류: {result.get('message')}" s = result.get("stats", {}) if s.get("skills_count", 0) == 0: return f"에이전트 '{agent_name}' 은(는) 아직 업로드한 스킬이 없습니다." return ( f"Agent: {s['name']}\n" f" Skills published: {s['skills_count']}\n" f" Total downloads: {s['total_downloads']}\n" f" Downloads (7d): {s['downloads_7d']}\n" f" Avg rating: {s['avg_rating']}\n" f" Top categories: {', '.join(s['top_categories']) if s['top_categories'] else '—'}\n" f" Latest skill at: {s.get('latest_skill_packaged_at', '—')}" ) - mcp_server/skill_store_mcp.py:1161-1161 (registration)The @mcp.tool() decorator registers this function as an MCP tool with the FastMCP server instance.
@mcp.tool() - mcp_server/skill_store_mcp.py:85-95 (helper)The _get helper function is used by the handler to make GET requests to the SKILL_STORE_URL API endpoint.
def _get(path: str, params: dict = None) -> dict: url = SKILL_STORE_URL + path if params: url += "?" + urllib.parse.urlencode({k: v for k, v in params.items() if v is not None}) try: with urllib.request.urlopen(url, timeout=10) as resp: return json.loads(resp.read().decode()) except urllib.error.HTTPError as e: return {"status": "error", "message": f"HTTP {e.code}: {e.reason}"} except Exception as e: return {"status": "error", "message": str(e)}