Skip to main content
Glama

finder_get_current_folder

Retrieve the path of the active Finder window on macOS to identify the current working directory for file operations.

Instructions

Get path of currently viewed folder in frontmost Finder window

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that executes osascript command to retrieve the POSIX path of the target folder in the frontmost Finder window.
    case 'finder_get_current_folder':
      try {
        const command = `osascript -e 'tell application "Finder" to get POSIX path of (target of front window as alias)'`;
        const { stdout, stderr } = await execAsync(command);
        
        if (stderr.trim()) {
          return {
            content: [
              {
                type: 'text',
                text: `Error getting current folder: ${stderr.trim()}`,
              },
            ],
          };
        }
        
        const folderPath = stdout.trim();
        return {
          content: [
            {
              type: 'text',
              text: `Current folder: ${folderPath}`,
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text',
              text: `Error executing current folder command: ${error.message}`,
            },
          ],
        };
      }
  • src/index.ts:61-67 (registration)
    Tool registration in the ListTools response, including name, description, and empty input schema.
      name: 'finder_get_current_folder',
      description: 'Get path of currently viewed folder in frontmost Finder window',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Input schema definition for the tool (no parameters required).
    inputSchema: {
      type: 'object',
      properties: {},
    },
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the tool's behavior (retrieves a path) but lacks details on error conditions (e.g., if no Finder window is open), return format, or system dependencies. It adds basic context but misses operational specifics.

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?

The description is a single, efficient sentence that front-loads the core purpose with zero wasted words. It directly communicates the tool's function without redundancy or unnecessary elaboration.

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

Completeness3/5

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

Given the tool's low complexity (0 parameters, no annotations, no output schema), the description is minimally adequate. It covers the basic purpose but lacks details on output (e.g., path format) and error handling, which would enhance completeness for reliable agent use.

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

Parameters4/5

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

With 0 parameters and 100% schema coverage, the baseline is high. The description adds value by clarifying the target ('currently viewed folder in frontmost Finder window'), which the empty schema cannot convey, though it doesn't need to explain parameters.

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

Purpose5/5

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

The description clearly states the specific action ('Get path') and target resource ('currently viewed folder in frontmost Finder window'), with no ambiguity. It distinguishes itself from sibling tools like 'finder_get_selection' by focusing on the current folder path rather than selected items.

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?

The description implies usage context (when a Finder window is active and frontmost) but does not explicitly state when to use this tool versus alternatives or provide exclusions. No sibling tool directly overlaps, but guidance on prerequisites (e.g., Finder must be running) is missing.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/samicokar/mcp-mac'

If you have feedback or need assistance with the MCP directory API, please join our Discord server