Skip to main content
Glama
soil-dev

capsulemcp

by soil-dev

delete_tag_definition

Destructive

Permanently delete a tag definition from an entity type's tag namespace, removing it from every record. Use for cleaning up stray, mistyped, or test tags. Confirmation required.

Instructions

DESTRUCTIVE & TENANT-WIDE: permanently delete a tag DEFINITION from an entity type's tag namespace (parties / opportunities / projects). Unlike remove_tag_by_id — which detaches a tag from ONE record and leaves the definition intact for others — this removes the definition itself, so the tag disappears from EVERY record that shared it. Use it to clean up stray / mistyped / test tag definitions polluting the tenant-global list. Requires confirm=true. Always read the affected tag first via list_tags and confirm with the user; if you only want to untag one record, use remove_tag_by_id instead. Irreversible (re-creating by name via add_tag mints a brand-new id). Idempotent on retry: {deleted: true, alreadyDeleted: false, entity, tagId} on a fresh delete, or {deleted: true, alreadyDeleted: true, entity, tagId} if the definition was already gone (Capsule's 404 is caught). Endpoint verified empirically (DELETE //tags/{id} → 204).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagIdYesThe tag definition's id (from list_tags, or embed='tags' on a record). NOT an entity id.
entityYesWhich entity type.
confirmYesMust be set to true. DESTRUCTIVE & tenant-wide: permanently deletes the tag DEFINITION from this entity type's tag namespace, removing it from EVERY record that shares it — not just one. To detach a tag from a single record while keeping the definition, use remove_tag_by_id instead. Irreversible (the definition is gone; re-creating by name via add_tag mints a new id). Idempotent on retry.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.3.0
    • changedInput schema / required
      Previous value: -[
      -  "entity",
      -  "confirm"
      -]New value: +[
      +  "entity",
      +  "tagId",
      +  "confirm"
      +]
  2. Changed2 schema fields changedv2.1.2
    • changedInput schema / properties / entity / description
      Previous value: -"Which entity type. Use 'kases' for projects (Capsule's legacy path name)."New value: +"Which entity type."
    • changedInput schema / properties / entity / enum
      Previous value: -[
      -  "parties",
      -  "opportunities",
      -  "kases"
      -]New value: +[
      +  "parties",
      +  "opportunities",
      +  "projects"
      +]
  3. Addedv1.7.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, and the description goes well beyond them: it discloses the tenant-wide blast radius, irreversibility (re-creating mints a new id), idempotency on retry with exact return shapes for both fresh-delete and already-deleted cases, and that the 404 is caught. No contradiction with annotations – all added context is consistent.

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 critical warning ('DESTRUCTIVE & TENANT-WIDE') before anything else, then proceeds through scope, contrast, use case, workflow, irreversibility, and idempotency. Every sentence earns its place for an operation this dangerous; the only borderline clause (endpoint verification) is a single parenthetical that adds confidence.

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 tenant-wide mutation with no output schema, the description covers everything an agent needs: operation, scope, prerequisites, alternatives, return values for both success paths, and error handling. The input schema covers parameters at 100%, and return behavior is spelled out in the description since no output schema exists.

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% and the schema itself is already rich (tagId is clarified as NOT an entity id; confirm's description is detailed). The description adds value beyond that by providing workflow context: reading the tag first via list_tags, confirming with the user, and the return payloads tied to tagId/entity. It reinforces rather than merely repeats.

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 precise verb+resource: 'permanently delete a tag DEFINITION from an entity type's tag namespace', and immediately distinguishes itself from the sibling tool remove_tag_by_id. An agent can tell exactly what this tool does and what it does not do, without needing to open the schema.

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?

Gives explicit when-to-use ('clean up stray / mistyped / test tag definitions'), explicit when-not-to-use ('if you only want to untag one record, use remove_tag_by_id instead'), and a required precondition workflow ('Always read the affected tag first via list_tags and confirm with the user'). This is fully actionable routing guidance.

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

Deploy Server

Other Tools