Skip to main content
Glama
soil-dev

capsulemcp

by soil-dev

add_tag

Attach a tag to a party, opportunity, or project by name, reusing existing tags or creating new ones when needed.

Instructions

Attach a tag to a party, opportunity, or project by NAME. Capsule resolves to an existing tag in the tenant or creates a fresh one with this name. Matching is case-insensitive — 'VIP' and 'vip' attach the same tag, preserving the canonical casing from whichever variant was created first. To avoid creating a genuinely-distinct near-duplicate (e.g. 'VIP' vs 'V.I.P.'), call list_tags first and reuse the exact name. Idempotent — re-attaching an already-attached tag is harmless. To DETACH a tag, use remove_tag_by_id with the tag's id (read via get_party/get_opportunity/get_project with embed='tags').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityYesWhich entity type.
tagNameYesName of the tag to attach. Capsule resolves by name: if a tag with this name already exists in the tenant it is attached to the entity; if not, Capsule creates the tag and attaches it. Names are tenant-global. Capsule matches case-INSENSITIVELY when resolving (so 'VIP' and 'vip' attach the same tag), preserving the canonical casing from whichever variant was created first. To ensure consistent casing in your tag list, call list_tags first and reuse the exact name from there. Idempotent — re-attaching an already-attached tag is harmless.
entityIdYesThe party/opportunity/project id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.3.0
    • changedInput schema / required
      Previous value: -[
      -  "entity",
      -  "tagName"
      -]New value: +[
      +  "entity",
      +  "entityId",
      +  "tagName"
      +]
  2. Changed3 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"
      +]
    • changedInput schema / properties / entityId / description
      Previous value: -"The party/opportunity/kase id."New value: +"The party/opportunity/project id."
  3. Addedv1.7.0
  4. Removedv1.6.2
  5. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false. The description adds crucial behavior beyond that: resolve-or-create semantics, case-insensitive matching with canonical-casing preservation, and explicit idempotency ('re-attaching an already-attached tag is harmless'). No contradiction with annotations; the creation-on-miss side effect is surfaced clearly.

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?

Every sentence earns its place: core purpose is front-loaded, followed by resolution behavior, case-sensitivity nuance, duplicate-avoidance guidance, idempotency, and the detach alternative. The length is justified by the genuinely non-obvious matching behavior and sibling routing; there is no filler.

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 3-param tool with a rich description and 100% schema coverage, the definition is nearly complete: it covers what the tool does, side effects, idempotency, and alternatives. The only gap is that, with no output schema present, the description never states what the tool returns (e.g., whether it returns the resolved tag or a success indicator), which the rubric implies the description should cover.

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 coverage is 100%, and the schema's tagName description is nearly a verbatim copy of the tool description, so the schema already carries full parameter meaning. The description adds marginal value for entity/enum and entityId, which the schema documents adequately. Baseline 3 is appropriate since the description does not compensate for any schema gap (there is none).

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?

The description opens with a specific verb+resource: 'Attach a tag to a party, opportunity, or project by NAME.' It clearly distinguishes this tool from the sibling cluster (remove_tag_by_id, delete_tag_definition, batch_add_tag, list_tags) by emphasizing attach-by-name semantics, so an agent can select it 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?

The description gives explicit routing: 'call list_tags first and reuse the exact name' to avoid near-duplicates, and 'To DETACH a tag, use remove_tag_by_id with the tag's id (read via get_party/get_opportunity/get_project with embed="tags")'. This names the alternatives and the conditions that select them, leaving nothing to inference.

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