MCPcopy
hub / github.com/sansan0/TrendRadar / get_available_dates_resource

Function get_available_dates_resource

mcp_server/server.py:82–95  ·  view source on GitHub ↗

获取可用的数据日期范围 返回本地存储中可查询的日期列表。

()

Source from the content-addressed store, hash-verified

80
81@mcp.resource("data://available-dates")
82async def get_available_dates_resource() -> str:
83 """
84 获取可用的数据日期范围
85
86 返回本地存储中可查询的日期列表。
87 """
88 tools = _get_tools()
89 result = await asyncio.to_thread(
90 tools['storage'].list_available_dates, source="local"
91 )
92 return json.dumps({
93 "dates": result.get("data", {}).get("local", {}).get("dates", []),
94 "description": "本地存储中可查询的日期列表"
95 }, ensure_ascii=False, indent=2)
96
97
98@mcp.resource("config://keywords")

Callers

nothing calls this directly

Calls 2

_get_toolsFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected