Skip to main content
Glama

Build Territories by Account Field

account_build

Builds territories that follow an account column, such as rep name or territory code from CRM: each part goes to the group holding most of its accounts (conflict_policy). Adds a new alignment (TAL). Needs an ingested point_layer, grouping_field, part_layer, and tal_label. Grouping values are labels, not balance metrics. part_scope: bbox_intersect (default; parts near the accounts) or explicit with part_filter, e.g. {state_abbr: TX}. A declared visit-frequency column needs visit_frequency_field or ignore_visit_frequency (CLARIFICATION_REQUIRED otherwise). With map_session_id the open map is the input. Returns a task; the result carries tal_id and ts_handle. analyze reports the statistics.

Input Schema

NameRequiredDescriptionDefault
tsNo
part_idsNo
tal_labelNo
ts_handleNo
part_layerNo
part_scopeNo
output_modeNotal is the default. assignments returns assignments_artifact plus an authenticated download_url and a key-less share_url; no ts_handle, tal_id, or map_refresh.tal
part_filterNo
point_layerYes
repair_policyNoTopology repair for dissolved territories. default fills interior holes in the dissolved geometry (no part is added or reassigned; repair_summary.changed_part_ids lists the territories' own parts). report_only detects holes and changes nothing (warning REPAIR_AVAILABLE). strict fails with REPAIR_REQUIRED when a hole is found.default
grouping_fieldNo
map_session_idNo
conflict_policyNoplurality_account_count
expected_revisionNo
visit_frequency_fieldNo
ignore_visit_frequencyNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / output_mode / description
      Previous value: -"tal is the default. assignments returns assignments_artifact plus an authenticated download_url; no ts_handle, tal_id, or map_refresh."New value: +"tal is the default. assignments returns assignments_artifact plus an authenticated download_url and a key-less share_url; no ts_handle, tal_id, or map_refresh."
  2. Changed1 schema field changed
    • removedInput schema / properties / guidance_handle
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Guidance Handle"
      -}
  3. Changed2 schema fields changed
    • addedInput schema / properties / repair_policy / description
      Added value: +"Topology repair for dissolved territories. default fills interior holes in the dissolved geometry (no part is added or reassigned; repair_summary.changed_part_ids lists the territories' own parts). report_only detects holes and changes nothing (warning REPAIR_AVAILABLE). strict fails with REPAIR_REQUIRED when a hole is found."
    • addedInput schema / properties / repair_policy / enum
      Added value: +[
      +  "default",
      +  "strict",
      +  "report_only"
      +]
  4. First observed

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare it a non-read-only, non-destructive, non-idempotent write. The description adds real value: it returns a task whose result carries tal_id and ts_handle, it signals the CLARIFICATION_REQUIRED failure path, and it clarifies that additions are additive ('Adds a new alignment'). It does not address concurrency or what happens to existing alignments beyond that.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and mechanism, then parameters and failure modes. Dense but nearly every clause carries operational meaning. Minor cost from parenthetical asides that slightly interrupt flow.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter build tool with low schema coverage, the description supplies the critical inputs, the conflict rule, the scoping choice, the clarification gate, and the return shape. Remaining gaps (expected_revision for optimistic concurrency, part_ids selection semantics) are real but secondary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 13% across 16 parameters, so the description carries most of the burden and does so well: it defines part_scope options, gives a part_filter shape example, explains grouping_field versus conflict_policy, and pairs visit_frequency_field with ignore_visit_frequency. It leaves ts, part_ids, expected_revision, and map_session_id's precedence only lightly or not at all explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and mechanism: 'Builds territories that follow an account column.' It explains how assignment works (each part goes to the group with most of its accounts) and that a new alignment (TAL) is added. It does not name the sibling builders (auto_build, direct_build, seed_build) it contrasts with, so the differentiation is implicit rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It lists concrete prerequisites (an ingested point_layer, grouping_field, part_layer, tal_label), explains the part_scope default versus the part_filter alternative with an example, and flags a CLARIFICATION_REQUIRED condition around visit frequency. It stops short of stating when to choose this builder over auto_build or cluster_points.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources