Skip to main content

talonic_documents_generate_display_name_script

Draft a rule script from a plain-language instruction, e.g. "drop the number in front of the name and the date at the end", using the workspace's own filenames as examples. Saves nothing: show the draft to the user, try it with talonic_documents_preview_display_name_rule, then save it with talonic_documents_set_display_name_rule. Admin only.

How an agent uses it

  • Returns: { lua_script, explanation, sample_filenames[] }.
  • 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

  • Reads only. It never changes workspace data.
  • Cost: no credits.

Parameters

ParameterTypeDescription
instruction *stringThe rule in the user's own words.
sample_sizeintegerFilenames to draw examples from (default 40). Range: 1 to 200.

Example

Tool input
{
  "instruction": "<instruction>"
}

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.