add_attribute
Attach a typed key/value attribute, like Occupation or Identification Number, to a Gramps person, event, family, media, source, or citation. Use it to record details such as Blacksmith.
Instructions
Add a typed key/value attribute to an object. update_attribute changes or removes one already there.
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": {
"object_type": "<object_type>",
"target": "<target>",
"name": "<name>",
"value": "<value>"
},
"name": "add_attribute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Attribute type/name, e.g. 'Occupation', 'Identification Number', or a custom name the tree already has. | |
| value | Yes | Attribute value, e.g. 'Blacksmith'. | |
| target | Yes | Handle or gramps_id of the object. | |
| object_type | Yes | Type of the object: 'person', 'event', 'family', 'media', 'source', 'citation'. | |
| allow_new_type | No | Accept a type that is neither a Gramps standard type nor one of the tree's custom types, creating it as a new custom type. Only when meant: a near-miss is refused with the closest names. |