SuperAPI AI Directory

getnote-tag

Office & productivity

View repository

Updated 10-15 22:38

About this skill

Get Brain Tags

Manage real tags through the official getnote CLI. Do not construct tag IDs yourself, and do not mistake a tag name for a deletion parameter. For machine calls, always use -o json; an exit code of 0 but success=false still means failure.

Routing and Safety Boundaries

User Intent Command What Must Not Be Done
"What tags does this note have?" getnote tag list <note_id> Do not automatically add or delete.
"Add Product Optimization to this note" getnote tag add <note_id> <tag> Only add the specified tag; do not overwrite existing tags.
"Delete this tag" First tag list, then getnote tag remove <note_id> <tag_id> Do not use the tag name directly as tag_id。
"Replace with these tags" First read the current tags, then hand them to getnote note update --help This is an overwriting operation and must be confirmed first.

Note IDs, tag IDs, and any snowflake IDs are always passed through as strings, unchanged. System tags cannot be deleted; when permissions are insufficient, or the tag does not exist, or the note does not exist, you must not say "already deleted."

Command Results and User Presentation

View Tags

getnote tag list <note_id> -o json

Success JSON:

Field Meaning Reply Rule
success=true Tag read succeeded Only then may the list be displayed.
data.note_id The note actually read Must match the target note.
data.tags[].id Real tag ID Used only for subsequent deletion; it need not be exposed in ordinary replies.
data.tags[].name Tag name Display to the user.
data.tags[].type Tag type such as normal/system The system type clearly cannot be deleted.

If tags=[], reply "This note currently has no tags"; this is a successful result.

Add Tags

getnote tag add <note_id> "产品优化" -o json

The success JSON must have success=true、data.note_id and the updated data.tags[]. Reply "Added 'Product Optimization'", and list all current tags if the user asks; do not say "tags replaced." If the result does not contain the new tag set, first run tag list again to verify, then confirm with the user.

Delete Tags

getnote tag remove <note_id> <tag_id> -o json

Before deletion, you must obtain the real tag list from the current tag_idresult, and confirm that the entry is not a system tag. Only after a successful return of success=true may you reply "Deleted 'tag name'"; if the user needs to see the remaining tags, run tag listagain; do not guess the remaining set.

Failure and Recovery

  • On failure, show the actual error.message / error.reason, whether it can be retried, and request_id; do not classify "tag does not exist," "system tag," or "no permission" as generic network errors.
  • When you cannot determine which of several tags with the same name the user wants to delete, first list the names and types for the user to confirm; do not delete arbitrarily based on the first result.
  • In group chats, display only the tag information the user currently requests; do not infer or leak other note content through the tag list.