Amap Weather Query Tool
Weather lookups for your LLM agent (China-only)
- tool
If you build an LLM agent and ask it "what's the weather like," it needs a tool for that - it has no live sensors of its own. This node is comfyui_LLM_party's answer, but with a catch you should know before you wire it up: it's built on Amap (高德地图, "Gaode Map"), Alibaba's mapping and location platform, which is the dominant service in mainland China and essentially unused everywhere else. This is a China-region weather tool, not a general-purpose one.
How it works
Add the node to your agent's tool list, and the LLM gets a callable function it can invoke mid-conversation when a question needs current weather. Under the hood it hits Amap's weather API for the city you've configured and returns conditions the model can fold into its answer. The node itself doesn't do any reasoning about when to check the weather - that decision lives with the LLM, which sees this tool's description and decides to call it when the user's question warrants it.
The inputs and outputs that matter
city_code(default110000) - this is the field to get right, and it isn't a city name or a ZIP code. It's Amap's adcode, a six-digit administrative code (110000is Beijing). If you want weather for a different city, you need that city's adcode from Amap's own reference tables, not "Shanghai" typed as text.api_key- your own Amap developer key. Note the node ships with the placeholder literally reading "你的高德API密钥" ("your Amap API key") even in the English build - a small rough edge from the pack's Chinese-first origin, and a reminder you can't skip getting a real key here.is_enable- a simple on/off toggle for the tool without deleting the node from your graph.- One output:
tool- wire this into the tool-list input on your agent/LLM node, same as the rest of the party's tool nodes.
How to install it
- ComfyUI Manager - search "comfyui_LLM_party", install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/heshengtao/comfyui_LLM_party, then restart.
Then run pip install -r requirements.txt from inside the comfyui_LLM_party folder, in your ComfyUI Python environment (python_embeded\python.exe -m pip install -r requirements.txt for a portable Windows install). No special dependency for this node beyond the pack's baseline requirements - the real prerequisite is external: you need a free Amap developer account and API key from Amap's open platform, since the node's default key is just a placeholder string.
Common issues & troubleshooting
Nothing comes back, or the wrong city's weather comes back. Ninety percent of the time this is city_code - people try typing a city name or a Western postal code where Amap expects its own numeric adcode. Look up the correct code for your target city on Amap's own admin-code reference before assuming the tool is broken.
You're outside China and this is useless to you. Amap doesn't meaningfully cover locations outside mainland China. If you need weather for a US or European city, this specific node isn't the right pick - you'd build a general-purpose weather tool yourself with the pack's api_tool node instead, pointed at a service that actually covers your region.
The pack won't install at all. Users have hit a real, current issue where the pack installs via Manager, requirements.txt runs without obvious errors, and nodes still fail to load - usually a CUDA/PyTorch version mismatch with no published compatibility list to check against. That's a whole-pack problem, not something specific to this node, so rule it out first if AmapWeatherTool isn't even showing up in the node browser.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| city_code | STRING | 110000 | — |
| api_key | STRING | 你的高德API密钥 | — |
| is_enable | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| tool | STRING | — |