Skip to main content
Glama
ianderso
by ianderso

tag_object

Attach a named tag to a Gramps object, creating it if missing, so you can label records like Verified or Needs review for cross-cutting organization.

Instructions

Attach a named Tag to an object, creating the Tag if it doesn't exist yet.

Tags are lightweight cross-cutting labels ('Verified', 'Needs review', 'DNA-confirmed'). Matching is by exact name; an existing tag is reused.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagYesTag name (found-or-created by exact match), e.g. 'Verified'. To REMOVE a tag: detach_object(child_kind='tag', child=<tag name>).
colorNoOptional hex color for a newly-created tag, e.g. '#FF8800'. Defaults to '#4444FF'. Ignored if the tag already exists.
targetYesHandle or gramps_id of the object to tag.
object_typeYesType of the object to tag: 'person', 'family', 'event', 'source', 'citation', 'place', 'repository', 'media', 'note'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.1
    • changedInput schema / properties / tag / description
      Previous value: -"Tag name (found-or-created by exact match), e.g. 'Verified'."New value: +"Tag name (found-or-created by exact match), e.g. 'Verified'. To REMOVE a tag: detach_object(child_kind='tag', child=<tag name>)."
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With annotations supplied, the description usefully adds behavior beyond them: the tag entity is auto-created if absent, matching is by exact name, and an existing tag is reused rather than duplicated. It does not state permission requirements or confirm what happens when the same tag is attached twice, which is the one gap; note the mild tension between 'existing tag is reused' and idempotentHint=false, though this concerns tag creation rather than the association itself.

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

Conciseness4/5

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

Two sentences, front-loaded with the action and its key side effect, followed by brief clarifying context. The example tag names are mildly decorative but cheap; nothing is wasted or buried.

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 4-parameter additive mutation with full schema coverage and declared annotations, the description covers the core action, its side effect, and match semantics. Missing only edge-case behavior (duplicate attachment, permissions) to be fully self-sufficient.

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 the baseline is 3. The description reinforces the find-or-create semantics of `tag` and the labeling concept, but adds nothing about `target`, `object_type`, or the ignored-when-existing behavior of `color` beyond what the schema already says.

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

Purpose4/5

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

States a specific verb+resource ('Attach a named Tag to an object') and adds the important find-or-create nuance plus exact-name matching. It doesn't name or distinguish itself from the relevant siblings (detach_object, list_tags), so it lands at clear-but-undifferentiated rather than fully distinguishing.

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

Usage Guidelines3/5

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

The parenthetical description of tags as 'lightweight cross-cutting labels' implies when tagging is appropriate, but there is no explicit when-to-use, when-not, or pointer to alternatives. The removal path (detach_object) appears only in the schema's `tag` description, not in the tool description itself.

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