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
| Name | Required | Description | Default |
|---|---|---|---|
| word | No | Word 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", }, }, }, ),
- src/mcp_server_macos_defaults/server.py:220-221 (registration)Registration dispatch in the @server.call_tool() handler that routes calls to the 'find' function.elif name == "find": return find(arguments)