Request Part Selection
request_part_selectionLets the person adjust boundaries by picking parts (e.g. ZIPs) on the map: puts the open map into select mode on a part_layer, for purpose realign, a new territory, or a plain list. Returns selection_task_id; get_part_selection reports status (awaiting_user_selection, then committed, expired, or cancelled) and the committed part_ids, and its response carries recommended_poll_delay_ms. The commit happens on the map, not in chat. destination_territory_id and realign_operation pre-set a realign. Works on the in-chat map and the map_url tab. map_session_id selects on the open map; ts_handle opens a stored Territory Solution first. initial_part_filter opens with a set pre-selected (e.g. in_tal or white space not_in_tal) for the person to trim; build from the committed set with part_filter {selection_task_id}. A selection the person started from the map legend is read with get_map_selection.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"part_layer": "<part_layer>"
},
"name": "request_part_selection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | No | Human-facing selection instruction shown by the host/agent or MC. | |
| purpose | No | generic | |
| user_id | No | Stable caller id; finds the open map when map_session_id is omitted. | |
| ts_handle | No | Territory Solution reference (tsh_...) from a build, ingest_accounts, import_geojson, import_designer_project, or get_map_visualization; Territory Solutions are not accepted inline. | |
| part_layer | Yes | ||
| active_tal_id | No | Alignment shown as active while the person selects. | |
| new_territory | No | ||
| expiry_seconds | No | ||
| map_session_id | No | Open map session (msess_...) from get_map_visualization. Its Territory Solution is the input; omit ts_handle when set. | |
| realign_operation | No | ||
| initial_part_filter | No | Pre-selects the parts this filter matches (same shape as auto_build part_filter, e.g. {in_tal: {tal_id}} or {state_abbr: TX, not_in_tal: {tal_id}}). Resolved server-side, up to 50,000 parts; selection_task_id is rejected here. | |
| destination_territory_id | No | Optional receiver leaf territory when Monica/agent named the destination up front. | |
| remove_empty_territories | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | Present when ok is false. | |
| result | No | Present when ok is true. | |
| warnings | No |