Skip to main content
Glama
g0t4

macOS Defaults MCP Server

by g0t4

find

Search macOS system preferences and application settings for entries containing specific words to locate configuration options.

Instructions

Find entries container given word

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wordNoWord to search for

Implementation Reference

  • The handler function for the 'find' tool. It extracts the 'word' from arguments and runs the macOS 'defaults find <word>' command via subprocess, returning the output as TextContent.
    def find(arguments: dict | None) -> list[types.TextContent]: # ask for help to find a setting, that alone is possibly very useful if arguments is None: raise ValueError("Arguments are required") word = arguments["word"] result = subprocess.run(["defaults", "find", word], capture_output=True) return [types.TextContent(type="text", text=f"Found: {result.stdout.decode('utf-8')}")]
  • JSON Schema definition for the 'find' tool input, specifying a required 'word' string argument.
    types.Tool( name="find", description="Find entries container given word", inputSchema= { "type": "object", "properties": { "word": { "type": "string", "description": "Word to search for", }, }, }, ),
  • Registration dispatch in the @server.call_tool() handler that routes calls to the 'find' function.
    elif name == "find": return find(arguments)

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/g0t4/mcp-server-macos-defaults'

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