Skip to main content
Glama

check_permissions

Verify macOS Accessibility and Screen Recording permissions for desktop automation. Returns status and setup instructions for missing permissions.

Instructions

Check whether macOS Accessibility and Screen Recording permissions are granted. Returns status for each permission and instructions for any that are missing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'check_permissions' tool which tests Accessibility and Screen Recording permissions.
    async function handleCheckPermissions(): Promise<CallToolResult> {
      const accessibility = await testAccessibility();
      const screenRecording = await testScreenRecording();
    
      const missing: string[] = [];
      if (!accessibility) missing.push(ACCESSIBILITY_INSTRUCTIONS);
      if (!screenRecording) missing.push(SCREEN_RECORDING_INSTRUCTIONS);
    
      const instructions =
        missing.length === 0
          ? "All permissions granted."
          : `Grant the following permissions:\n${missing.map((m) => `  - ${m}`).join("\n")}`;
    
      return {
        content: [
          {
            type: "text" as const,
            text: JSON.stringify(
              { accessibility, screenRecording, instructions },
              null,
              2,
            ),
          },
        ],
      };
    }
  • Input schema definition for the 'check_permissions' tool.
    const CheckPermissionsInputSchema = z.object({});
  • MCP tool definition for 'check_permissions' in utilityToolDefinitions array.
    {
      name: "check_permissions",
      description:
        "Check whether macOS Accessibility and Screen Recording permissions are granted. Returns status for each permission and instructions for any that are missing.",
      inputSchema: zodToToolInputSchema(CheckPermissionsInputSchema),
      annotations: {
        readOnlyHint: true,
        destructiveHint: false,
      },
    },
  • Registration of the 'check_permissions' handler in the tool dispatch map.
    check_permissions: () => enqueue(() => handleCheckPermissions()),

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/antbotlab/mac-use-mcp'

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