Skip to main content
Glama

Create a territory

create_territory

Create an empty territory owned by one location (dealer). It covers nothing until postcodes are added with add_territory_postcodes, and nothing reaches a visitor until publish_territories. Polygons and regions are drawn on the map in the dashboard.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesWhat the territory is called, for create.
rankNoLower wins when two territories cover the same address. Default 0.
exclusiveNoAn exclusive territory returns only its owner for a covered address; otherwise the owner is pinned to the top and the rest still show.
locationIdYesThe dealer that owns this territory, for create.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, so safety is partly covered, but the description adds genuinely useful state behavior: the new territory is inert (covers nothing) and has no visitor effect until two later operations run. It doesn't address authentication, duplicate-name handling, or whether the created record can be rolled back.

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

Conciseness5/5

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

Three short sentences, front-loaded with the core action and then the lifecycle caveats. Every sentence carries distinct information and none restates the tool name or schema.

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?

With no output schema, the description could have noted that the created territory's identifier is needed for the follow-up add_territory_postcodes call, which is a minor gap. Otherwise it fully explains the entity's initial state and downstream dependencies for a non-destructive mutation.

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

Parameters3/5

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

Schema description coverage is 100%, so all four parameters are already documented in the schema, including the rank tie-break rule and exclusive routing. The description only mildly reinforces semantics by glossing locationId as the owning dealer; it adds no format or constraint detail beyond the schema.

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

Purpose5/5

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

States a specific verb and resource ('Create an empty territory') and immediately qualifies the result with ownership ('owned by one location (dealer)'). It differentiates itself from neighbors by naming add_territory_postcodes and publish_territories as the steps that give the territory meaning.

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?

Clearly frames this as the first step in a workflow: the territory covers nothing until add_territory_postcodes, and nothing reaches visitors until publish_territories. It does not state any when-not-to-use condition or mention alternatives such as updating an existing territory, so it stops short of full routing guidance.

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