Skip to content

Commit a998f4f

Browse files
Add storage tools to README
1 parent b59fb9d commit a998f4f

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,86 @@ Removes an environment variable from the YepCode workspace.
204204
}
205205
```
206206

207+
### Storage Management
208+
209+
YepCode provides a built-in storage system that allows you to upload, list, download, and delete files. These files can be accessed from your code executions using the `yepcode.storage` helper methods.
210+
211+
#### list_files
212+
213+
Lists all files in your YepCode storage.
214+
215+
```typescript
216+
// Input
217+
{
218+
prefix?: string; // Optional prefix to filter files
219+
}
220+
221+
// Response
222+
{
223+
files: Array<{
224+
filename: string; // File name or path
225+
size: number; // File size in bytes
226+
lastModified: string; // Last modification date
227+
}>;
228+
}
229+
```
230+
231+
#### upload_file
232+
233+
Uploads a file to YepCode storage.
234+
235+
```typescript
236+
// Input
237+
{
238+
filename: string; // File path (e.g., 'file.txt' or 'folder/file.txt')
239+
content: string | { // File content
240+
data: string; // Base64 encoded content for binary files
241+
encoding: "base64";
242+
};
243+
}
244+
245+
// Response
246+
{
247+
success: boolean; // Upload success status
248+
filename: string; // Uploaded file path
249+
}
250+
```
251+
252+
#### download_file
253+
254+
Downloads a file from YepCode storage.
255+
256+
```typescript
257+
// Input
258+
{
259+
filename: string; // File path to download
260+
}
261+
262+
// Response
263+
{
264+
filename: string; // File path
265+
content: string; // File content (base64 for binary files)
266+
encoding?: string; // Encoding type if binary
267+
}
268+
```
269+
270+
#### delete_file
271+
272+
Deletes a file from YepCode storage.
273+
274+
```typescript
275+
// Input
276+
{
277+
filename: string; // File path to delete
278+
}
279+
280+
// Response
281+
{
282+
success: boolean; // Deletion success status
283+
filename: string; // Deleted file path
284+
}
285+
```
286+
207287
### Process Execution
208288

209289
The MCP server can expose your YepCode Processes as individual MCP tools, making them directly accessible to AI assistants. This feature is enabled by just adding the `mcp-tool` tag to your process (see our docs to learn more about [process tags](https://yepcode.io/docs/processes/tags)).

0 commit comments

Comments
 (0)