Amap Geocode Tool
Let your LLM agent turn addresses into coordinates
- tool
This node doesn't run when you click "queue" - it registers a capability. Wire its tool output into this pack's LLM/agent node, and the model itself decides, mid-conversation, whether it needs to look up an address. That's the pattern for every node in this pack whose output is called tool or tools: they're function-calling definitions, not data-processing steps.
What this particular tool does is geocoding - turning a human-readable address into map coordinates - through Amap (高德地图, also known internationally as AutoNavi), which is China's dominant mapping platform. That's worth knowing before you reach for it: this isn't a general-purpose geocoder. Amap's coverage and accuracy are built for addresses inside China; if your agent is fielding questions about a New York street or a London postcode, this tool isn't the one you want.
The inputs and outputs that matter
address- the default value in the schema is a real Beijing street address, which is really just a placeholder showing the expected format, not something you're meant to leave in place.api_key- your Amap API key. The schema's default literally reads "your Amap API key" - it will not work until you replace it with a real one.is_enable- standard bypass toggle.
Output: tool (STRING) - the serialized tool definition. It isn't meant to be read directly; it's meant to be wired into the agent node's tool-list input.
How to install it
Via ComfyUI Manager: search comfyui_LLM_party, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/heshengtao/comfyui_LLM_party.git
Then pip install -r requirements.txt from inside the pack folder using ComfyUI's own Python, and restart. The node itself needs no local model - it's a thin wrapper around Amap's web API - but you do need an Amap developer account and a key from their LBS open platform before it does anything useful.
Common issues & troubleshooting
The agent never calls this tool. Same as any tool-calling setup: the LLM only reaches for a tool if it has a reason to think it exists and is relevant. If your agent's system prompt doesn't mention it has address-lookup capability, or the user's question doesn't obviously call for one, the model may just answer from its own knowledge instead of invoking the tool.
Calls fail or return nothing. Check api_key isn't still the placeholder text first - that's the most common reason any API-backed tool node in this pack does nothing. After that, sanity-check the address itself: Amap's geocoder is strongest for addresses actually inside China, so results for addresses elsewhere may be inaccurate or empty even with a valid key.
Getting a key is more friction than you expected. Amap's developer console (lbs.amap.com) is a Chinese platform end to end, and account registration commonly expects a Chinese phone number for verification - worth knowing going in if you're setting this up from outside China, rather than assuming it's a quick sign-up like Google's.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| address | STRING | 北京市朝阳区阜通东大街6号 | — |
| api_key | STRING | 你的高德API密钥 | — |
| is_enable | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| tool | STRING | — |