Skip to main content
Glama
Zhuoli

macOS Tools MCP Server

by Zhuoli

network_services

List configured network services on macOS to view current network setup and diagnose connectivity issues.

Instructions

List configured network services as reported by networksetup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Registers the 'network_services' tool with FastMCP using @app.tool decorator.
    @app.tool(
        name="network_services",
        description="List configured network services as reported by `networksetup`.",
    )
  • Handler function for the network_services tool. Converts the iterable from tools.available_network_services() to a list.
    def network_services(_: Context | None = None) -> list[str]:
        return list(tools.available_network_services())
  • Low-level helper that runs the `networksetup -listallnetworkservices` command and returns its stdout.
    def network_services() -> str:
        """Return all configured network services via ``networksetup``."""
        return _run_command(["networksetup", "-listallnetworkservices"])
  • Helper that parses the raw output from network_services(), filters and sanitizes lines to yield available network service names.
    def available_network_services() -> Iterable[str]:
        """Helper that returns the list of network services, skipping blank lines."""
        output = network_services()
        for line in output.splitlines():
            line = line.strip()
            if not line or line.startswith("An asterisk"):
                continue
            sanitized = line.lstrip('* ').strip()
            if sanitized:
                yield sanitized
Behavior3/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 mentions the data source (`networksetup`), which adds useful context about how the information is gathered, but doesn't describe output format, potential errors, or system dependencies. The description doesn't contradict annotations (since none exist), but it's minimal for a tool with no annotation coverage.

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, well-structured sentence that front-loads the key action ('List configured network services') and adds relevant context ('as reported by `networksetup`'). There is zero waste, and every word earns its place, making it highly concise and effective.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no annotations, but has an output schema), the description is reasonably complete. It clearly states what the tool does and the data source, which is sufficient for a listing tool. The output schema will handle return values, so the description doesn't need to explain them. However, it could benefit from more behavioral context or usage guidance.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100% (since there are no parameters to describe). The description doesn't need to add parameter semantics, so a baseline score of 4 is appropriate—it efficiently states the tool's purpose without unnecessary parameter details.

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 tool's purpose with a specific verb ('List') and resource ('configured network services'), and mentions the source (`networksetup`). However, it doesn't explicitly differentiate from sibling tools like 'network_service_details', which might provide more detailed information about individual services.

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?

The description provides no guidance on when to use this tool versus alternatives like 'network_service_details' or other network-related tools. It lacks context about use cases, prerequisites, or exclusions, leaving the agent to infer usage based on the tool name alone.

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