Documentation Index
Fetch the complete documentation index at: https://agentclientprotocol.com/llms.txt Use this file to discover all available pages before exploring further.
File System
Client filesystem access methods
The filesystem methods allow Agents to read and write text files within the Client’s environment. These methods enable Agents to access unsaved editor state and allow Clients to track file modifications made during agent execution.
Checking Support
Before attempting to use filesystem methods, Agents MUST verify that the Client supports these capabilities by checking the Client Capabilities field in the initialize response:
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"protocolVersion": 1,
"clientCapabilities": {
"fs": {
"readTextFile": true,
"writeTextFile": true
}
}
}
}
If readTextFile or writeTextFile is false or not present, the Agent MUST NOT attempt to call the corresponding filesystem method.
Reading Files
The fs/read_text_file method allows Agents to read text file contents from the Client’s filesystem, including unsaved changes in the editor.
{
"jsonrpc": "2.0",
"id": 3,
"method": "fs/read_text_file",
"params": {
"sessionId": "sess_abc123def456",
"path": "/home/user/project/src/main.py",
"line": 10,
"limit": 50
}
}The Client responds with the file contents:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": "def hello_world():\n print('Hello, world!')\n"
}
}Writing Files
The fs/write_text_file method allows Agents to write or update text files in the Client’s filesystem.
{
"jsonrpc": "2.0",
"id": 4,
"method": "fs/write_text_file",
"params": {
"sessionId": "sess_abc123def456",
"path": "/home/user/project/config.json",
"content": "{\n \"debug\": true,\n \"version\": \"1.0.0\"\n}"
}
}The Client MUST create the file if it doesn’t exist.
The Client responds with an empty result on success:
{
"jsonrpc": "2.0",
"id": 4,
"result": null
}
Last updated Oct 08, 2026