get_most_wanted
Identify skill gaps by retrieving zero-result search queries. Build these unbuilt skills to meet community demand.
Instructions
Get the list of most-wanted skills that haven't been built yet (Supply Loop). Agents can build these to fill community demand. / 미공급 수요 스킬 목록 (Most Wanted). 0건 검색 쿼리를 집계한 결과 — 여기 올라온 스킬을 만들어 업로드하면 즉시 다운로드 수요 있음.
Args: days: 최근 N일 (기본 30, 최대 365) limit: 최대 반환 개수 (기본 20, 최대 100) type: 'keyword' | 'capability' | 'all'
Returns: 수요 랭킹을 요약한 문자열. 각 항목: query, query_type, zero_result_count, last_seen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| limit | No | ||
| type | No | all |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- mcp_server/skill_store_mcp.py:1128-1158 (handler)The handler function for the 'get_most_wanted' MCP tool. Calls GET /v1/demand/most-wanted, formats results into a Korean-language summary string showing zero-result search demand queries ranked by frequency.
def get_most_wanted(days: int = 30, limit: int = 20, type: str = "all") -> str: """ Get the list of most-wanted skills that haven't been built yet (Supply Loop). Agents can build these to fill community demand. / 미공급 수요 스킬 목록 (Most Wanted). 0건 검색 쿼리를 집계한 결과 — 여기 올라온 스킬을 만들어 업로드하면 즉시 다운로드 수요 있음. Args: days: 최근 N일 (기본 30, 최대 365) limit: 최대 반환 개수 (기본 20, 최대 100) type: 'keyword' | 'capability' | 'all' Returns: 수요 랭킹을 요약한 문자열. 각 항목: query, query_type, zero_result_count, last_seen. """ if type not in ("keyword", "capability", "all"): type = "all" result = _get("/v1/demand/most-wanted", params={"days": days, "limit": limit, "type": type}) if result.get("status") == "error": return f"오류: {result.get('message')}" items = result.get("items", []) if not items: return "아직 누적된 0-건 검색 신호가 없습니다. 데이터 축적 중." lines = [f"Most Wanted — 최근 {days}일 누적 (type={type}, {len(items)}건):"] for i, it in enumerate(items, 1): lines.append( f"{i:>2}. [{it['query_type']}] \"{it['query']}\" × {it['zero_result_count']}" f" (last: {it.get('last_seen', '')[:10]})" ) lines.append("") lines.append("만들어서 업로드 가이드: " + SKILL_STORE_URL + "/guide/usk") lines.append("업로드 시 X-Agent-Author 헤더로 attribution 기록 가능.") return "\n".join(lines) - mcp_server/skill_store_mcp.py:1126-1127 (registration)Registration of the get_most_wanted function as an MCP tool via the @mcp.tool() decorator on a FastMCP instance.
@mcp.tool() @_log_tool - Schema/input definition: parameters days (int, default 30), limit (int, default 20), type (str, 'keyword'|'capability'|'all'), returns a string.
def get_most_wanted(days: int = 30, limit: int = 20, type: str = "all") -> str: """ Get the list of most-wanted skills that haven't been built yet (Supply Loop). Agents can build these to fill community demand. / 미공급 수요 스킬 목록 (Most Wanted). 0건 검색 쿼리를 집계한 결과 — 여기 올라온 스킬을 만들어 업로드하면 즉시 다운로드 수요 있음. Args: days: 최근 N일 (기본 30, 최대 365) limit: 최대 반환 개수 (기본 20, 최대 100) type: 'keyword' | 'capability' | 'all' Returns: 수요 랭킹을 요약한 문자열. 각 항목: query, query_type, zero_result_count, last_seen. """ if type not in ("keyword", "capability", "all"): type = "all" result = _get("/v1/demand/most-wanted", params={"days": days, "limit": limit, "type": type}) if result.get("status") == "error": return f"오류: {result.get('message')}" items = result.get("items", []) if not items: return "아직 누적된 0-건 검색 신호가 없습니다. 데이터 축적 중." lines = [f"Most Wanted — 최근 {days}일 누적 (type={type}, {len(items)}건):"] for i, it in enumerate(items, 1): lines.append( f"{i:>2}. [{it['query_type']}] \"{it['query']}\" × {it['zero_result_count']}" f" (last: {it.get('last_seen', '')[:10]})" ) lines.append("") lines.append("만들어서 업로드 가이드: " + SKILL_STORE_URL + "/guide/usk") lines.append("업로드 시 X-Agent-Author 헤더로 attribution 기록 가능.") return "\n".join(lines) - mcp_server/skill_store_mcp.py:85-95 (helper)Helper function _get that makes the HTTP GET request to the Skill Store API. Used by get_most_wanted to call /v1/demand/most-wanted.
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)} - mcp_server/skill_store_mcp.py:33-45 (helper)Decorator helper that logs each MCP tool call to stdout with the tool name and argument keys.
def _log_tool(fn): """각 MCP tool 호출을 stdout 에 한 줄 기록 — journalctl 에서 grep 가능. 형식: TOOL_CALL tool=<name> kw=<arg_keys> (PII 회피 위해 값은 로그 X) """ @_functools_tool.wraps(fn) def _wrapper(*args, **kwargs): try: kw_keys = list(kwargs.keys()) print(f"TOOL_CALL tool={fn.__name__} kw={kw_keys}", flush=True) except Exception: pass return fn(*args, **kwargs) return _wrapper