Skip to main content
Glama
JackXuyi

Current operating environment

getAvailableNetworks

Retrieve available network connections and their details for the current device to identify connectivity options and troubleshoot network issues.

Instructions

获取当前设备可用的网络信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'getAvailableNetworks' tool. Retrieves active network interfaces and available WiFi networks using os.networkInterfaces() and si.wifiNetworks(), formats them, and returns as JSON response.
    case "getAvailableNetworks": {
      const networkInterfaces = os.networkInterfaces();
      const availableNetworks: Record<string, any> = {};
    
      // 获取网络接口信息
      for (const [interfaceName, interfaces = []] of Object.entries(networkInterfaces)) {
        availableNetworks[interfaceName] = interfaces.map((info) => ({
          address: info.address,
          netmask: info.netmask,
          family: info.family,
          internal: info.internal
        }));
      }
    
      // 获取 Wi-Fi 网络信息
      const wifiNetworks = await si.wifiNetworks();
    
      return {
        content: [{
          type: "text",
          text: JSON.stringify({ networkInterfaces: availableNetworks, wifiNetworks }, null, 2)
        }]
      };
    }
  • src/index.ts:181-189 (registration)
    Registration of the 'getAvailableNetworks' tool in the list of available tools, including its name, description, and input schema (no parameters required).
    {
      name: "getAvailableNetworks",
      description: "获取当前设备可用的网络信息",
      inputSchema: {
        type: "object",
        properties: {},
        required: []
      }
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it gets network information but doesn't specify what type of information (e.g., Wi-Fi networks, Ethernet connections, signal strength), whether it requires permissions, or if it's a read-only operation. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Chinese that directly states the purpose without unnecessary words. It's appropriately sized for a simple tool, though it could be slightly more specific to improve clarity without losing conciseness.

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

Completeness2/5

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

Given the complexity of network-related tools and the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'available network information' entails or how it differs from sibling tools, leaving gaps in understanding the tool's behavior and output for effective use by an AI agent.

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 the schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it doesn't introduce any confusion, warranting a baseline score of 4 for this dimension.

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 verb ('获取' meaning 'get') and resource ('当前设备可用的网络信息' meaning 'available network information for the current device'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'getNetworkInfo' or 'getWifiInfo', which likely provide different scopes or details of network information.

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. With sibling tools like 'getNetworkInfo', 'getWifiInfo', 'getIpv4Info', and 'getIpv6Info' available, there's no indication of how this tool differs in scope or context, leaving the agent to guess based on the 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/JackXuyi/env-mcp'

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