ai_tags
ai_tags.add_to_thread
Add AI Tags to Thread
Effects: write
Apply one or more AI tags to a thread (manually).
When to use:
- User wants to label a conversation with one or more tags
- User asks to categorize or tag a thread
Provide the thread_id (integer) and an array of tag_ids to apply.
If a tag is already applied it will be updated to is_manual=true.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
tag_ids | array | yes | Array of tag IDs to apply (1–20 IDs) |
thread_id | integer | yes | ID of the thread to tag |
ai_tags.create
Create AI Tag
Effects: write
Create a new AI tag (automatic message filter).
AI tags are lightweight classifiers that run on every incoming message. When a message matches the tag's description/criteria, the thread is automatically labelled — so AI agents can cheaply pre-filter threads instead of running full LLM analysis on everything. Good descriptions are the key: they tell the classifier exactly when to apply this tag.
When to use:
- User wants to auto-classify incoming messages (e.g. bug reports, sales leads, support requests)
- User wants to reduce AI agent costs by pre-filtering threads by topic or intent
Tips for the description field:
- Be specific: 'Messages reporting errors, crashes, or unexpected behavior in the product'
- Include examples of what qualifies and what doesn't
Limit: 20 active personal tags / 50 active team tags.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
color | string | no | Tailwind color key for the tag badge. Allowed: amber, blue, green, red, purple, yellow, slate. OMIT to use the default color. (one of amber, blue, green, purple, red, slate, yellow) |
description | string | no | Classifier prompt: describe exactly when this tag should be applied to a thread. The more specific, the better the auto-classification accuracy. E.g. 'Messages reporting software errors, crashes, or unexpected behavior'. Max 500 chars. |
icon | string | no | Emoji icon for the tag (max 10 chars, optional) |
name | string | yes | Tag name (max 100 chars) |
ai_tags.delete
Delete AI Tag
Effects: delete
Delete a personal AI tag. All thread associations are removed automatically.
When to use:
- User wants to permanently remove a tag they no longer need
This cannot be undone. Threads are NOT deleted — they just lose this tag.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
tag_id | integer | yes | ID of the tag to delete |
ai_tags.list
List AI Tags
Effects: read
List all personal AI tags.
AI tags are automatic message filters: the system runs a lightweight classifier on every incoming message and applies matching tags to threads. This lets AI agents skip expensive full analysis on most messages — they only act on threads that match relevant tags, dramatically cutting LLM costs.
When to use:
- Check which auto-classification filters exist before creating one
- Get tag IDs for add_to_thread / remove_from_thread
- See how many threads each tag currently matches
Returns all tags with thread counts (non-archived, included threads only).
Arguments
No arguments.
ai_tags.remove_from_thread
Remove AI Tag from Thread
Effects: delete
Remove a specific AI tag from a thread.
When to use:
- User wants to un-label or remove a specific tag from a conversation
- User wants to correct an incorrectly applied tag
Provide both thread_id and tag_id.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
tag_id | integer | yes | ID of the tag to remove |
thread_id | integer | yes | ID of the thread to remove the tag from |
ai_tags.update
Update AI Tag
Effects: write
Update an existing personal AI tag's name, description, icon, color, or active state.
When to use:
- User wants to rename a tag
- User wants to change a tag's icon, color, or description
- User wants to enable or disable a tag
Provide only the fields you want to change. At least one field is required.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
color | string | no | New color key. Allowed: amber, blue, green, red, purple, yellow, slate. OMIT to leave the color unchanged. (one of amber, blue, green, purple, red, slate, yellow) |
description | string | no | New LLM hint (max 500 chars; empty string clears it, optional) |
icon | string | no | New emoji icon (max 10 chars, optional) |
is_active | boolean | no | Enable (true) or disable (false) the tag. OMIT to leave the active flag unchanged. |
name | string | no | New tag name (max 100 chars, optional) |
tag_id | integer | yes | ID of the tag to update |