Skip to main content
Glama

mcp_call_mac_system_profiler

Retrieve detailed Mac system information by specifying a datatype. Use to analyze hardware, software, network, and device details for debugging and understanding system configurations.

Instructions

Call the system_profiler with the given datatype. Allow LLM to deepdive into the system information. This function is used to get the system information to help user to understand the system and potentially debug. Allowed datatypes: - SPAirPortDataType - Airport/WiFi information - SPApplicationsDataType - Application information - SPAudioDataType - Audio device information - SPBluetoothDataType - Bluetooth information - SPCameraDataType - Camera information - SPDiagnosticsDataType - Diagnostic information - SPDisplaysDataType - Display and graphics information - SPFirewallDataType - Firewall settings - SPHardwareDataType - Hardware specifications - SPLocationDataType - Location services information - SPMemoryDataType - Memory information - SPNetworkDataType - Network settings and interfaces - SPNVMeDataType - NVMe storage details - SPPCIDataType - PCI devices information - SPPowerDataType - Battery and power information - SPSoftwareDataType - Software and OS information - SPStorageDataType - Storage devices and volumes - SPThunderboltDataType - Thunderbolt ports and connections - SPUSBDataType - USB devices and connections

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datatypeYes

Implementation Reference

  • The primary handler function for the 'mcp_call_mac_system_profiler' tool. It is registered via the @mcp.tool decorator and delegates to the load_system_profiler helper after receiving the datatype parameter. Includes comprehensive docstring listing allowed datatypes serving as input schema documentation.
    @mcp.tool(name="mcp_call_mac_system_profiler") async def mcp_call_mac_system_profiler(datatype: str) -> str: """ Call the system_profiler with the given datatype. Allow LLM to deepdive into the system information. This function is used to get the system information to help user to understand the system and potentially debug. Allowed datatypes: - SPAirPortDataType - Airport/WiFi information - SPApplicationsDataType - Application information - SPAudioDataType - Audio device information - SPBluetoothDataType - Bluetooth information - SPCameraDataType - Camera information - SPDiagnosticsDataType - Diagnostic information - SPDisplaysDataType - Display and graphics information - SPFirewallDataType - Firewall settings - SPHardwareDataType - Hardware specifications - SPLocationDataType - Location services information - SPMemoryDataType - Memory information - SPNetworkDataType - Network settings and interfaces - SPNVMeDataType - NVMe storage details - SPPCIDataType - PCI devices information - SPPowerDataType - Battery and power information - SPSoftwareDataType - Software and OS information - SPStorageDataType - Storage devices and volumes - SPThunderboltDataType - Thunderbolt ports and connections - SPUSBDataType - USB devices and connections """ return load_system_profiler(datatype)
  • Supporting helper function that performs input validation against ALLOWED_DATATYPES set and executes the macOS system_profiler command via os.popen to retrieve system information.
    def load_system_profiler(datatype: str): if datatype not in ALLOWED_DATATYPES: raise ValueError( f"Invalid datatype: {datatype}. Allowed datatypes are: {ALLOWED_DATATYPES}" ) return os.popen(f"system_profiler {datatype}").read()
  • Predefined set of allowed datatypes for input validation, serving as the schema for valid inputs to the system_profiler tool.
    ALLOWED_DATATYPES = set( [ "SPAirPortDataType", "SPApplicationsDataType", "SPAudioDataType", "SPBluetoothDataType", "SPCameraDataType", "SPDiagnosticsDataType", "SPDisplaysDataType", # Display information (resolution, graphics) "SPFirewallDataType", "SPHardwareDataType", "SPLocationDataType", "SPMemoryDataType", "SPNetworkDataType", "SPNVMeDataType", # NVMe storage details "SPPCIDataType", # PCI devices information "SPPowerDataType", # Battery and power information "SPSoftwareDataType", "SPStorageDataType", "SPThunderboltDataType", # Thunderbolt connections "SPUSBDataType", # USB devices ] )
  • The @mcp.tool decorator registers the handler function with the MCP server under the specified name.
    @mcp.tool(name="mcp_call_mac_system_profiler")

Other Tools

Related 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/zhongmingyuan/mcp-my-mac'

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