Skip to main content
Glama

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

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

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