Territory Management

4 entities and 24 agent-callable operations in territory. Each operation is addressed as {mega_tool}/territory/{entity}/{operation} and carries the same permission check over MCP and REST.

membership

OperationMega-toolWhat it does
listreport_queryList the accounts and leads that belong to one territory, in a single paginated envelope.

territory

OperationMega-toolWhat it does
activateworkflow_actionSet this territory's status to active.
createentity_crudCreate a territory
deactivateworkflow_actionSet this territory's status to inactive.
deleteentity_crudDelete a territory
hierarchyreport_queryThe territory and its full child subtree, recursive, scoped to the caller's organization and excluding soft-deleted rows.
listentity_crudList territories
readentity_crudGet territory details
rematchworkflow_actionRe-run territory rule matching over this territory's leads and accounts and report what would change.
sdr_cycle_opt_inworkflow_actionTurn this territory's SDR outreach cycle on or off and set its cron.
statsreport_queryHeadline numbers for one territory: accounts (the FK union the ledger union), leads, assignments, total and active rules, direct children, and status.
updateentity_crudUpdate a territory

territory_assignment

OperationMega-toolWhat it does
createentity_crudCreate a territory assignment
deleteentity_crudDelete a territory assignment
listentity_crudList territory assignments
my_territoriesentity_crudList the calling user's OWN territory assignments in this organization — the agent twin of GET /api/territory/assignments/my-territories/.
readentity_crudGet territory assignment details
updateentity_crudUpdate a territory assignment

territory_rule

OperationMega-toolWhat it does
createentity_crudCreate a territory rule
deleteentity_crudDelete a territory rule
listentity_crudList territory rules
readentity_crudGet territory rule details
testworkflow_actionEvaluate one territory rule against a sample record and report whether it matches, using the same operator semantics the live matcher uses.
updateentity_crudUpdate a territory rule

Parameter schemas and permissions

Parameter schemas and permission codenames are in the full reference — sign in — or call prism_introspect(dimension="capability_search", query="…") with your key.

In the full reference this application appears under entity_crud, report_query, workflow_action.