Skip to main content
Lists the files attached to an earlier task of the same agent, newest first, and says of each whether the task received it or generated it. Display name “List Task Files”. Off by default. Use it when a document arrived on an earlier task and is needed now. For example, a case that comes in over several submissions may need a document from the first submission once the case is in scope. Store the earlier task’s id, list its files, then call attach_task_file to bring one onto the running task and get a file_url an extraction tool can read.

Authentication and enablement

No integration. Off by default; enable it on the agent’s tools list. Read-only.

Inputs

Output

  • files: the task’s files that have not been deleted, newest first. There are no URLs here; use attach_task_file for one.
  • origin:
    • received means the task was sent the file: a trigger’s or API call’s attachment, an email attachment, a file a user added in a message, or a file the task got from another task (through attach_task_file, or because the task was forked from it). A forked task’s copies of the original’s outputs therefore read as received.
    • generated means the task’s own tools wrote the file while it ran, such as a split document, a converted copy or an output workbook.
  • total: how many files match (all of them, or only the requested origin). truncated is true when there are more than the 200 listed.

Limits and side effects

  • No side effects, and no model call.
  • Lists at most 200 files, the newest first.
  • Same agent only: the agent’s own tasks, in any of its versions. A task of another agent, or in another workspace, returns the same error as a task that does not exist. This keeps a document within the reach of the people who can see that agent’s tasks. A deleted task has no files to list.

Expected errors

  • task <id> not found: no task with that id for this agent, or the task was deleted.
  • task_id must be a task UUID: the input is not a UUID.
  • origin must be "received" or "generated": any other origin value.
  • no task in context: called outside a running task.
  • task files are unavailable: misconfigured deployment.