Skip to main content

talonic_documents_batch_tag

Add, remove or set tags on up to 1000 documents in one call. mode: add (default) merges, remove takes the given tags away, set replaces each document's tags with exactly these. All or nothing: one hidden or missing document refuses the whole batch with 404. Tags can control who sees a document, so remove and set can take access away: call only when the user asked.

How an agent uses it

  • Returns: { updated, mode, tags[], results[] { id, status, tags[] }, audit_event_id }.
  • A 403 names its reason (insufficient_scope, insufficient_role, no_person, person_inactive, workspace_read_only): the key's person must be allowed the same action in the Talonic web app, and an OAuth connection must have granted the scope. Tell the user; do not retry.

Availability

Listed per area (Spec runs, ingest, ingest settings, document organising, collections, saved filters, document types) when your role can use that area of the workspace. Being listed only means the tool is visible: Talonic checks your role again on every call.

Behaviour and cost

  • Changes workspace data and can't be undone. Call it only when the user asked.

Parameters

ParameterTypeDescription
document_ids *string[]Documents to change, 1 to 1000.
tags *string[]Tags, at most 50, each up to 64 characters.
mode"add" | "remove" | "set"add (default), remove, or set.

Example

Tool input
{
  "document_ids": [
    "<document_id>"
  ],
  "tags": [
    "<tag>"
  ]
}

Errors

A failed call comes back as a tool error with the HTTP status and a message that says what to change. Troubleshooting lists the common ones.