Skip to main content
Glama
mcp-server-macos

mcp-server-macos

Ask to pick files

ask_for_files

Prompts 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

NameRequiredDescriptionDefault
typesNoLimit the choice, by extension (['pdf', 'png']) or type identifier (['public.image']).
folderNoThe folder the picker opens in.
promptNoWhat the picker says.
multipleNoTrue to let the user pick several files.
timeout_secondsNoHow long to wait for the user, in seconds, before closing the dialog as if it was cancelled.

Output Schema

NameRequiredDescriptionDefault
pathsYesThe paths picked. Empty when the user cancelled, or didn't answer in time.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv1.3.2
    • removedInput schema / properties / folder / title
      Removed value: -"Folder"
    • removedInput schema / properties / multiple / title
      Removed value: -"Multiple"
    • removedInput schema / properties / prompt / title
      Removed value: -"Prompt"
    • addedInput schema / properties / timeout_seconds
      Added value: +{
      +  "default": 120,
      +  "description": "How long to wait for the user, in seconds, before closing the dialog as if it was cancelled.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 600,
      +  "type": "number"
      +}
    • removedInput schema / properties / types / title
      Removed value: -"Types"
    • removedInput schema / title
      Removed value: -"ask_for_filesArguments"
    • changedOutput schema / properties / paths / description
      Previous value: -"The paths picked. Empty when the user cancelled."New value: +"The paths picked. Empty when the user cancelled, or didn't answer in time."
    • removedOutput schema / properties / paths / title
      Removed value: -"Paths"
    • removedOutput schema / title
      Removed value: -"ChosenPaths"
  2. Addedv0.1.1

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes beyond the annotations by disclosing that the call blocks until the user answers and that waiting can end when time expires. That blocking/cancellation profile is the key behavioral trait for a modal dialog and is not expressed by readOnlyHint/destructiveHint/openWorldHint alone. It stops short of saying what a timeout yields versus an explicit cancel or whether closing the dialog leaves any side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with the purpose front-loaded and the blocking/timeout caveat immediately after. No redundant wording or restated field names.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema, rich annotations, and full schema coverage, the description only needs to convey the dialog's blocking nature, which it does. It could still say what the agent receives when the user cancels or the timeout fires, since that determines branching, but the essentials are present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and every parameter already carries a description, including extension/type filtering, starting folder, prompt text, and the timeout with its maximum. The description adds only the loose hint that multi-selection is possible ('a file, or several'), so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb-plus-resource: it lets the user pick one or several files in the system's file picker, and names the waiting behavior. An agent can tell it is a user-facing file selection dialog, distinct from the folder-picker sibling, though the description never names that sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied — the agent infers it should call this when it needs the user to choose files. There is no explicit when-to-use, when-not-to-use, or pointer to alternatives such as ask_for_folder for directories or ask_text for typed paths.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.