11---
22title : File
3- description : Read and parse multiple files
3+ description : Read and write workspace files
44---
55
66import { BlockInfoCard } from " @/components/ui/block-info-card"
@@ -27,7 +27,7 @@ The File Parser tool is particularly useful for scenarios where your agents need
2727
2828## Usage Instructions
2929
30- Upload files directly or import from external URLs to get UserFile objects for use in other blocks .
30+ Read and parse files from uploads or URLs, write new workspace files, or append content to existing files .
3131
3232
3333
@@ -52,4 +52,45 @@ Parse one or more uploaded files or files from URLs (text, PDF, CSV, images, etc
5252| ` files ` | file[ ] | Parsed files as UserFile objects |
5353| ` combinedContent ` | string | Combined content of all parsed files |
5454
55+ ### ` file_write `
56+
57+ Create a new workspace file. If a file with the same name already exists, a numeric suffix is added (e.g.,
58+
59+ #### Input
60+
61+ | Parameter | Type | Required | Description |
62+ | --------- | ---- | -------- | ----------- |
63+ | ` fileName ` | string | Yes | File name \( e.g., "data.csv"\) . If a file with this name exists, a numeric suffix is added automatically. |
64+ | ` content ` | string | Yes | The text content to write to the file. |
65+ | ` contentType ` | string | No | MIME type for new files \( e.g., "text/plain"\) . Auto-detected from file extension if omitted. |
66+
67+ #### Output
68+
69+ | Parameter | Type | Description |
70+ | --------- | ---- | ----------- |
71+ | ` id ` | string | File ID |
72+ | ` name ` | string | File name |
73+ | ` size ` | number | File size in bytes |
74+ | ` url ` | string | URL to access the file |
75+
76+ ### ` file_append `
77+
78+ Append content to an existing workspace file. The file must already exist. Content is added to the end of the file.
79+
80+ #### Input
81+
82+ | Parameter | Type | Required | Description |
83+ | --------- | ---- | -------- | ----------- |
84+ | ` fileName ` | string | Yes | Name of an existing workspace file to append to. |
85+ | ` content ` | string | Yes | The text content to append to the file. |
86+
87+ #### Output
88+
89+ | Parameter | Type | Description |
90+ | --------- | ---- | ----------- |
91+ | ` id ` | string | File ID |
92+ | ` name ` | string | File name |
93+ | ` size ` | number | File size in bytes |
94+ | ` url ` | string | URL to access the file |
95+
5596
0 commit comments