touch
Update file access and modification timestamps to the current time, or create empty files if they do not exist.
Instructions
Update file access and modification timestamps to the current time, or create empty files if they do not exist. Modifies filesystem metadata (timestamps), creates files when path does not exist. Returns JSON with the touched path. Use to refresh timestamps or ensure a file exists. Not for creating directories — use 'mkdir'. Not for changing file size — use 'truncate'. See also 'mkdir', 'truncate'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"paths": "<paths>"
},
"name": "touch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Files to touch. | |
| dry_run | No | Report operations without changing files. | |
| parents | No | Create missing parent directories. |