Skip to content

Relationship Tools

These tools manage the association between tags and thogits — applying tags, updating field values, and removing tags from individual thogits.

Apply a tag to an existing thogit with optional field values. The tag can be new (created inline) or existing.

NameTypeRequiredDescription
thogit_idstringYesThogit ULID
tagobjectYesTag to apply: {tag_ref, field_values}

The tag object:

NameTypeRequiredDescription
tag_refobjectYes{"New": {name, fields, ...}} or {"Existing": "ULID"}
field_valuesobjectNoField values to set. Omitted fields default to null.
// Request — apply existing tag with field values
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "apply_tag_to_thogit",
"arguments": {
"thogit_id": "01JEXAMPLE0000000000THOGIT",
"tag": {
"tag_ref": { "Existing": "01JEXAMPLE00000000000TAGID" },
"field_values": {
"status": { "variant": "in_progress" },
"priority": 9,
"due": "2025-03-15"
}
}
}
}
}
// Response — returns the full updated thogit
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"id\": \"01JEXAMPLE0000000000THOGIT\",\n \"name\": \"Implement user authentication\",\n \"tags\": [\n {\n \"tag\": { \"id\": \"01JEXAMPLE00000000000TAGID\", \"name\": \"Task\", ... },\n \"field_values\": { \"status\": { \"variant\": \"in_progress\" }, \"priority\": 9, \"due\": \"2025-03-15\" },\n \"schema_version\": 1\n }\n ]\n}"
}
]
}
}

Update field values for a tag already applied to a thogit. By default, replaces all field values (omitted fields become null). Use merge: true for partial updates.

NameTypeRequiredDescription
thogit_idstringYesThogit ULID
tag_idstringYesTag ULID
field_valuesobjectNoFields to set. Omitted fields become null unless merge: true.
mergebooleanNoIf true, merge with existing values instead of replacing all. Default: false
// Request — update only the status field, preserving all others
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "update_tag_field_values",
"arguments": {
"thogit_id": "01JEXAMPLE0000000000THOGIT",
"tag_id": "01JEXAMPLE00000000000TAGID",
"field_values": {
"status": { "variant": "done" }
},
"merge": true
}
}
}
// Response — returns the full updated thogit
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"id\": \"01JEXAMPLE0000000000THOGIT\",\n \"name\": \"Implement user authentication\",\n \"tags\": [\n {\n \"tag\": { \"id\": \"01JEXAMPLE00000000000TAGID\", \"name\": \"Task\", ... },\n \"field_values\": { \"status\": { \"variant\": \"done\" }, \"priority\": 9, \"due\": \"2025-03-15\" },\n \"schema_version\": 1\n }\n ]\n}"
}
]
}
}

Remove a tag from a thogit. This deletes the association and all stored field values for that tag on the thogit.

NameTypeRequiredDescription
thogit_idstringYesThogit ULID
tag_idstringYesTag ULID to remove
// Request
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "remove_tag_from_thogit",
"arguments": {
"thogit_id": "01JEXAMPLE0000000000THOGIT",
"tag_id": "01JEXAMPLE00000000000TAGID"
}
}
}
// Response — returns the updated thogit (without the removed tag)
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"id\": \"01JEXAMPLE0000000000THOGIT\",\n \"name\": \"Implement user authentication\",\n \"tags\": []\n}"
}
]
}
}

A typical workflow for managing tag associations:

  1. Apply a tag with initial field values using apply_tag_to_thogit.

  2. Update specific fields over time using update_tag_field_values with merge: true to change only what needs changing.

  3. Remove the tag when no longer relevant using remove_tag_from_thogit.

// Step 1: Apply the "Task" tag
{
"jsonrpc": "2.0", "id": 10,
"method": "tools/call",
"params": {
"name": "apply_tag_to_thogit",
"arguments": {
"thogit_id": "01JEXAMPLE0000000000THOGIT",
"tag": {
"tag_ref": { "Existing": "01JEXAMPLE00000000000TAGID" },
"field_values": { "status": { "variant": "todo" }, "priority": 5 }
}
}
}
}
// Step 2: Update status to done (merge preserves priority)
{
"jsonrpc": "2.0", "id": 11,
"method": "tools/call",
"params": {
"name": "update_tag_field_values",
"arguments": {
"thogit_id": "01JEXAMPLE0000000000THOGIT",
"tag_id": "01JEXAMPLE00000000000TAGID",
"field_values": { "status": { "variant": "done" } },
"merge": true
}
}
}
// Step 3: Remove the tag entirely
{
"jsonrpc": "2.0", "id": 12,
"method": "tools/call",
"params": {
"name": "remove_tag_from_thogit",
"arguments": {
"thogit_id": "01JEXAMPLE0000000000THOGIT",
"tag_id": "01JEXAMPLE00000000000TAGID"
}
}
}