Show Document Tool

Purpose

Use Show_Document to preview exactly one GovTribe user file, government file, or GovTribe AI shell artifact in chat. It is read-only by default.

Use annotation mode only when a human needs to mark up a WebViewer-viewable document and send review feedback back to chat.

Inputs

Provide exactly one document identifier:

  • user_file_id: GovTribe user file id.

  • external_file_id: GovTribe government file id.

  • shell_file_identifier: GovTribe AI shell artifact identifier such as sandbox:/mnt/data/report.pdf; only valid inside an active GovTribe AI response context.

Optional fields:

  • query: text to highlight after load.

  • scroll_to_query: whether to scroll to the highlighted query.

  • annotations: optional strict object enabling annotation mode.

Annotation Mode

Annotation mode is opt-in:

Supported tools are highlight, note, free_text, and rectangle. If tools is omitted, all four are enabled.

Annotations do not modify the source file. The widget persists normalized annotation state and WebViewer XFDF through Interaction_State, then submits a concise user message summary back to chat.

When submitted annotation comments are phrased as edits, treat them as follow-up instructions. For example, a comment such as "make this say GENERATED" means the user wants a revised document artifact; the annotation state identifies what to change, but a separate document-editing step must create the updated file.

Annotation mode is available only for WebViewer document previews such as PDFs. Inline image previews and unsupported file types remain read-only.

Output Behavior

Read-only previews do not return an interactionId.

Annotation-enabled previews return:

  • interactionId

  • kind: "document_annotation"

  • status: "pending"

  • isInteractive: true

  • annotationConfig

  • annotations: []

  • annotationCount: 0

  • xfdf: null

After submission, Interaction_State contains normalized annotations:

Examples

Read-only preview:

Search-highlighted preview:

Annotation-enabled PDF review:

Routing Guidance

Use document search or vector-store tools when the task is extracting text, searching clauses, summarizing document content, or doing semantic review.

Use Show_Document annotation mode when the user needs to visually inspect a document and provide human markup or comments.

If submitted comments request document changes, use the appropriate document artifact workflow to revise the file and show or return the updated document.

Last updated

Was this helpful?