Skip to main content
Glama
ianderso
by ianderso

add_attribute

Add a typed key/value attribute to a Gramps object, automatically using SrcAttribute for sources/citations and Attribute for other record types.

Instructions

Add a typed key/value attribute to an object.

Sources and citations use a SrcAttribute; everything else uses an Attribute. The right class is chosen automatically from object_type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesAttribute type/name, e.g. 'Occupation', 'National ID'.
valueYesAttribute value, e.g. 'Blacksmith'.
targetYesHandle or gramps_id of the object.
object_typeYesType of the object: 'person', 'event', 'family', 'media', 'source', 'citation'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare the write/non-idempotent/non-destructive profile, so the description's main added value is the internal behavior that the right class (SrcAttribute vs Attribute) is chosen automatically from object_type. It still omits anything about permissions, duplicate attribute names, or failure modes.

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 followed by the only non-obvious behavioral rule. 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 4-required-param mutation tool with full schema coverage and annotations carrying the safety profile, the description covers the action and the object_type→class rule adequately. Gaps around duplicate attributes and error conditions are minor.

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%, so all four parameters are already documented in the schema. The description adds one genuinely useful semantic link (object_type drives class selection) but no format or syntax details, so baseline 3 fits.

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 ('Add') and resource ('typed key/value attribute to an object'), which is clear and actionable. It does not, however, differentiate itself from adjacent mutation siblings such as update_object_fields or cite_object.

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?

Usage is only implied: 'to an object' and the class-selection note give the agent enough to know it is an attribute-writing tool, but there is no explicit when-to-use vs alternative (e.g. update_object_fields) and no note on prerequisites like target existence or duplicate handling.

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