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.Documentation Index
Fetch the complete documentation index at: https://agentclientprotocol.com/llms.txt
Use this file to discover all available pages before exploring further.
Checking Support
Before attempting to use filesystem methods, Agents MUST verify that the Client supports these capabilities by checking the Client Capabilities field in theinitialize response:
readTextFile or writeTextFile is false or not present, the Agent MUST NOT attempt to call the corresponding filesystem method.
Reading Files
Thefs/read_text_file method allows Agents to read text file contents from the Client’s filesystem, including unsaved changes in the editor.
The Session ID for this request
Absolute path to the file to read
Optional line number to start reading from (1-based)
Optional maximum number of lines to read
Writing Files
Thefs/write_text_file method allows Agents to write or update text files in the Client’s filesystem.
The Session ID for this request
Absolute path to the file to write.The Client MUST create the file if it doesn’t exist.
The text content to write to the file