获取可用的数据日期范围 返回本地存储中可查询的日期列表。
()
| 80 | |
| 81 | @mcp.resource("data://available-dates") |
| 82 | async 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") |
nothing calls this directly
no test coverage detected