Overview
Use the Filestore MCP server from your ATXP-powered agent to store, retrieve, and delete files.Example prompts
- “Upload the file
example.txt
to the filestore.” - “Download the file
example.txt
from the filestore.” - “Delete the file
example.txt
from the filestore.”
Tools
filestore_write
filestore_write
Takes file data and saves it to the file store. For example, if you need to save a file between conversations, you can use this tool.
Arguments
Accepts a JSON object with the following properties:The base64 encoded content of the file to save.
The URL of a file to copy contents from.
The content type of the file to save
The file extension of the file to save
Whether to make the file public.
Response
Returns a JSON object with the following properties:The status of the save file operation. The
status
key will have the value “success” when the file is saved successfully.The name of the file that was saved.
The URL that the file is accessible at.
filestore_read
filestore_read
Returns the contents of a file from the file store. For example, if you need to read a file between conversations, you can use this tool.
Arguments
Accepts a JSON object with the following properties:The ID of the file to read.
Response
Returns a JSON object with the following properties:The status of the read file operation. The
status
key will have the value “success” when the file is read successfully.The name of the file that was read.
The base64 encoded content of the file that was read.
filestore_delete
filestore_delete
Deletes a file from the file store. For example, if you need to delete a file between conversations, you can use this tool.
Arguments
Accepts a JSON object with the following properties:The name of the file to delete.
Response
Returns a JSON object with the following properties:The status of the delete file operation. The
status
key will have the value “success” when the file is deleted successfully.The name of the file that was deleted.
Usage
1
Define the Filestore service
Create a reusable service configuration that points to the MCP server and standardizes how you pass arguments and read results. This lets your agent easily interact with the Filestore tools in a consistent manner.
2
Create an ATXP client
- Using an ATXP account
- Using a Base account
- Using a Solana account
- Using a Worldchain account
- Using a Polygon account
Create a client using an ATXP account by importing the ATXP client SDK and other dependencies.
3
Use the Filestore service in your agent
Call the Filestore tool by passing your natural-language instruction as the argument the
getArguments
method.Read the response using the getResult
method.You should see the result of the filestore operation printed in your console.