Skip to main content
Glama

Delete Alignment

delete_tal
Destructive

Deletes one whole territory alignment (TAL: 'the territory layer', 'all territories') from the Territory Solution and the open map, in one synchronous call. Needs tal_id or the TAL's exact unique label, plus map_session_id or ts_handle. Points, part-layer overlays, and routes stay; the map switches to a remaining alignment or to points only. A TAL that is already gone returns ok with already_absent=true; an ambiguous label returns AMBIGUOUS_TAL. One territory is removed with delete_territory instead.

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": {
      "tal_id": "<tal_id>"
    },
    "name": "delete_tal"
  }
}

Input Schema

NameRequiredDescriptionDefault
tal_idYesTerritory layer / alignment to delete: tal_id or an exact unique TAL label. Removes the whole layer in one call (users say territory layer / all territories / alignment more often than TAL). One leaf is removed with delete_territory.
ts_handleNoTerritory Solution reference (tsh_...) from a build, ingest_accounts, import_geojson, import_designer_project, or get_map_visualization; Territory Solutions are not accepted inline.
map_session_idNoOpen map session (msess_...) from get_map_visualization. Its Territory Solution is the input; omit ts_handle when set.

Output Schema

NameRequiredDescriptionDefault
okYes
errorNoPresent when ok is false.
resultNoPresent when ok is true.
warningsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / map_session_id / description
      Added value: +"Open map session (msess_...) from get_map_visualization. Its Territory Solution is the input; omit ts_handle when set."
    • addedInput schema / properties / tal_id / description
      Added value: +"Territory layer / alignment to delete: tal_id or an exact unique TAL label. Removes the whole layer in one call (users say territory layer / all territories / alignment more often than TAL). One leaf is removed with delete_territory."
    • addedInput schema / properties / ts_handle / description
      Added value: +"Territory Solution reference (tsh_...) from a build, ingest_accounts, import_geojson, import_designer_project, or get_map_visualization; Territory Solutions are not accepted inline."
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / properties
      Added value: +{
      +  "error": {
      +    "description": "Present when ok is false.",
      +    "properties": {
      +      "ask_user": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "code": {
      +        "type": "string"
      +      },
      +      "details": {
      +        "type": "object"
      +      },
      +      "do_this_next": {
      +        "type": "object"
      +      },
      +      "message": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "ok": {
      +    "type": "boolean"
      +  },
      +  "result": {
      +    "description": "Present when ok is true.",
      +    "properties": {
      +      "active_tal_id": {
      +        "type": [
      +          "null",
      +          "string"
      +        ]
      +      },
      +      "already_absent": {
      +        "type": "boolean"
      +      },
      +      "deleted_tal_id": {
      +        "type": [
      +          "null",
      +          "string"
      +        ]
      +      },
      +      "do_this_next": {
      +        "type": "string"
      +      },
      +      "map_refresh": {
      +        "type": "object"
      +      },
      +      "remaining_tal_ids": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "requested_tal_id": {
      +        "type": "string"
      +      },
      +      "ts_handle": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "warnings": {
      +    "items": {
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "ok"
      +]
    • removedOutput schema / title
      Removed value: -"delete_talDictOutput"
  2. Changed1 schema field changed
    • removedInput schema / properties / guidance_handle
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Guidance Handle"
      -}
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructive/non-idempotent, but the description adds substantial context beyond them: points, part-layer overlays, and routes are preserved while the map falls back to a remaining alignment or points only. It also discloses the benign already-deleted path (ok with already_absent=true) and the AMBIGUOUS_TAL failure mode, which prevents an agent from treating a repeat delete or a fuzzy label as a hard error.

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?

Front-loaded with the verb and scope, then constraints, then fallback behavior, then the sibling disambiguation. Every sentence carries distinct information; parentheses for aliases are efficient rather than redundant.

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

Completeness5/5

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

For a destructive, 3-parameter tool with an output schema and full annotation coverage, the description supplies everything needed to call it correctly: inputs, session sourcing, side effects, idempotency nuance, and error semantics. Return-value details are rightly left to the output schema.

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 100%, so the baseline is 3, but the description adds meaning beyond the schema by framing tal_id as accepting a human-style label ('the territory layer', 'all territories') and presenting ts_handle vs map_session_id as interchangeable session sources. The one gap is that it does not restate the tsh_/msess_ handle provenance, which the schema already covers.

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 (deletes) plus the exact resource (one whole territory alignment layer) and scopes it to the Territory Solution and open map in a single synchronous call. It also names the nearest sibling (delete_territory) as the leaf-level alternative, so an agent can distinguish the two without opening schemas.

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

Usage Guidelines5/5

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

Explicitly separates whole-layer deletion from single-territory removal via 'One territory is removed with delete_territory instead.' It also states the required inputs (tal_id or exact unique label, plus map_session_id or ts_handle) and the conditions under which each applies, leaving little to inference.

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