Ask to pick files
ask_for_filesPrompts the user to pick one or more files through the native macOS file picker, with optional extension filters and a timeout. Returns the chosen files or a cancellation result.
Instructions
Let the user pick a file, or several, in the system's file picker. It waits until they answer, or the time runs out.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ask_for_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| types | No | Limit the choice, by extension (['pdf', 'png']) or type identifier (['public.image']). | |
| folder | No | The folder the picker opens in. | |
| prompt | No | What the picker says. | |
| multiple | No | True to let the user pick several files. | |
| timeout_seconds | No | How long to wait for the user, in seconds, before closing the dialog as if it was cancelled. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | The paths picked. Empty when the user cancelled, or didn't answer in time. |