Skip to main content
Glama
Zhuoli

macOS Tools MCP Server

by Zhuoli

system_profile

Retrieve structured system information from macOS, including software, hardware, and configuration data, using the system_profiler command.

Instructions

Return structured data from system_profiler for the requested data type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
data_typeNosoftware

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of the system_profile tool: validates data_type, runs system_profiler -json, parses and returns the output as dict.
    def system_profile(data_type: str = "software") -> dict:
        """Return structured JSON from ``system_profiler`` for a supported data type."""
        normalized = data_type.strip().lower()
        profiler_type = _ALLOWED_PROFILES.get(normalized, data_type.strip())
    
        if profiler_type not in _ALLOWED_PROFILES.values():
            supported = ", ".join(sorted(_ALLOWED_PROFILES))
            raise ToolError(
                f"Unsupported system_profiler data type {data_type!r}. Supported aliases: {supported}"
            )
    
        raw_output = _run_command(
            ["system_profiler", profiler_type, "-json"],
            timeout=_SYSTEM_PROFILER_TIMEOUT,
        )
    
        try:
            return json.loads(raw_output)
        except json.JSONDecodeError as exc:
            raise ToolError("Failed to parse system_profiler JSON output") from exc
  • MCP tool registration for system_profile, including name, description, input schema via type hints, and delegation to tools.system_profile.
    @app.tool(
        name="system_profile",
        description="Return structured data from `system_profiler` for the requested data type.",
    )
    def system_profile(data_type: str = "software", _: Context | None = None) -> dict:
        return tools.system_profile(data_type)
  • Helper mapping user-friendly data_type aliases to internal system_profiler data types used in the handler.
    _ALLOWED_PROFILES = {
        "software": "SPSoftwareDataType",
        "hardware": "SPHardwareDataType",
        "network": "SPNetworkDataType",
        "power": "SPPowerDataType",
    }
  • Timeout constant specifically for system_profiler commands.
    _SYSTEM_PROFILER_TIMEOUT = 120
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns structured data but doesn't explain how it behaves—such as whether it's read-only, requires permissions, has rate limits, or what the output format entails. This leaves significant gaps in understanding the tool's operation.

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 with no wasted words, clearly front-loading the tool's purpose. It's appropriately sized for a simple tool, making it easy to parse quickly.

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 (1 parameter, no nested objects) and the presence of an output schema, the description is somewhat complete but lacks critical context. It doesn't explain parameter semantics or behavioral traits, which are needed for effective use despite the output schema covering return values.

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

Parameters2/5

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

The description mentions 'requested data type' but doesn't add meaning beyond the input schema, which has 0% coverage and only lists 'data_type' with a default. No details on valid data types, examples, or constraints are provided, failing to compensate for the low schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Return structured data') and resource ('from `system_profiler`'), specifying the tool's function to retrieve system profiling information. However, it doesn't differentiate from sibling tools like 'battery_status' or 'diskutil_list' that also return system data, missing explicit distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description mentions 'requested data type' but doesn't specify what data types are available, when to choose this over sibling tools, or any prerequisites, leaving usage context unclear.

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/Zhuoli/mcp101'

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