Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

get_network_info

Retrieve network configuration details from Windows systems to monitor connectivity and troubleshoot network issues.

Instructions

获取网络信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that runs a PowerShell command to get IPv4 network addresses from non-loopback interfaces, parses the JSON output, and returns the interfaces list.
    async getNetworkInfo() {
      try {
        const command = `
          Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.InterfaceAlias -notlike '*Loopback*' } | ForEach-Object {
            @{
              Interface = $_.InterfaceAlias
              IPAddress = $_.IPAddress
              PrefixLength = $_.PrefixLength
            }
          } | ConvertTo-Json
        `;
    
        const { stdout } = await execAsync(`powershell -Command "${command.replace(/"/g, '\\"')}"`, {
          shell: 'powershell.exe'
        });
    
        let interfaces = [];
        try {
          interfaces = JSON.parse(stdout);
          if (!Array.isArray(interfaces)) {
            interfaces = [interfaces];
          }
        } catch {
          interfaces = [];
        }
    
        return { success: true, interfaces };
      } catch (error) {
        return { success: false, error: error.message };
      }
    }
  • Input schema definition for the get_network_info tool (no required properties).
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • Tool definition registration in getToolDefinitions(), including name, description, and schema.
    {
      name: 'get_network_info',
      description: '获取网络信息',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Registration in the executeTool switch statement that routes to the getNetworkInfo handler.
      return await this.getDiskInfo();
    case 'get_network_info':
      return await this.getNetworkInfo();
  • canHandle method registers get_network_info in the supported tools array.
    canHandle(toolName) {
      const tools = ['run_powershell', 'run_cmd', 'get_system_info', 
                     'get_disk_info', 'get_network_info'];
      return tools.includes(toolName);
Behavior1/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only states the action without details on output format, potential side effects, permissions required, or error conditions. For a tool with no structured annotations, this is insufficient to inform safe or effective use.

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

Conciseness2/5

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

The description is a single phrase '获取网络信息', which is overly concise to the point of under-specification. It lacks necessary details for clarity and completeness, failing to earn its place as a helpful description despite its brevity.

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

Completeness1/5

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

Given the tool's complexity (implied by retrieving network data), lack of annotations, and no output schema, the description is incomplete. It does not explain what information is returned, how it's structured, or any limitations, making it inadequate for the agent to understand the tool's behavior or outputs.

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%, so no parameter information is needed. The description does not add or detract from parameter understanding, meeting the baseline for parameterless tools without introducing confusion.

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

Purpose2/5

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

The description '获取网络信息' (Get network information) restates the tool name 'get_network_info' in Chinese, making it tautological. It lacks specificity about what network information is retrieved (e.g., IP addresses, network interfaces, connectivity status) and does not distinguish it from sibling tools like 'get_system_info' or 'get_disk_info', which could also provide related data.

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

Usage Guidelines1/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. It does not mention context, prerequisites, or exclusions, leaving the agent to guess based on the name alone. This is inadequate given the presence of sibling tools that might overlap in functionality.

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/eva-wanxin-git/windows-automation-mcp'

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