File Reader Skill
Use this skill to list visible file context or read content from a file that has already been resolved for the current assistant turn.
Workflow
- Use this skill only when the user is asking about a specific file, uploaded attachment, historical file reference, or current console file context.
- Do not invent file IDs. Use a file ID supplied by resolved page context, attachment context, or governed asset resolution.
- For listing requests such as "what files do I have", "which files are visible", "current files", or "selected files", use the current backend-backed page context when it is present and fresh. Call
list_visible_fileswhen that context is missing, ambiguous, stale, or needs an authoritative refresh. Do not useread_filefor a list-only request unless the user asks for file contents. - For read, summary, translation, extraction, comparison, or question answering, call
read_filewithfile_id. Setmax_charsonly when you need more or less returned content. - Inspect
content_statusbefore answering:- If
content_statusisextracted, answer fromcontent. - If
content_statusisempty, say the file has no extractable text content. - If
content_statusiserror, explain that the file could not be read and include the short error reason when useful.
- If
- The raw
contentreturned byread_fileis not durable across history reloads, approvals, navigation, refresh, or later tool phases. If later steps will use the file body, a summary, theme, topic, quote, title, prompt, config value, generated asset, or final answer derived from this file, callsubmit_turn_statebefore leaving the file-reading phase. Record a concise reusable fact withkind=working_fact,visibility=model_only,source=file-reader/read_file, and a meaningful key such assource_file_summary,source_file_theme, orexact_short_text. When the summary is useful for the user to verify, usekind=user_deliverable,visibility=user_visible, and a shorttitle/contentinstead. - If
content_truncatedis true and the missing tail matters, ask for a narrower question or retry with a highermax_charsup to the tool limit. - If the user asks to delete, rename, move, or otherwise manage a File Management asset, use
file-managerwhen it is available in the current files-page context. Iffile-manageris not available, explain that the current chat can read files but cannot perform that file-management operation from this surface. - Mention the file name when listing, summarizing, or quoting. Do not expose internal file IDs unless the user explicitly asks for them.
Tool Usage
read_file accepts:
file_id: required file ID from resolved context.max_chars: optional maximum returned content characters. Defaults to 4000 and is capped at 12000.- Success evidence: the tool result must identify the resolved file and include
content_status. Usecontentonly whencontent_status=extracted. Ifcontent_status=empty, report that no extractable text was found. Ifcontent_status=error, report the actual read failure instead of summarizing from filename or page metadata. - Handoff evidence: when
content_lifetime=current_tool_result_onlyandcontent_redacted_in_history=true, do not assume the rawcontentwill be available after continuation boundaries. Ifhandoff_recommended=trueand later steps depend on this content or a derived summary, callsubmit_turn_statebefore continuing to those steps.
list_visible_files accepts the current page query when available: page, page_size, keyword, sort, extension, processing_status, category, folder_id, workspace_id, and optional selected_ids. It returns:
source=backend_api: confirms the list came from the authoritative backend query.count: number of files in the returned page.selected_count: number of selected files.files: ordered files with ID, name, extension, MIME type, optional workspace ID, and verified selection state.- Success evidence: use the returned
fileslist andcountas the current visible-file state. Do not infer file contents from this list-only result.
Truthfulness Contract
- Treat file-reader results as authoritative. Do not answer from stale visible page metadata when a
read_fileresult is required. - If the target cannot be resolved or read, say so directly and ask for a narrower target only when the available context cannot identify the file.
- Retry at most once with corrected
file_idormax_charswhen the tool result indicates a recoverable issue.