Skip to main content
Glama
JackXuyi

Current operating environment

getVpnInfo

Retrieve VPN connection details for the current device to verify network configuration and security status.

Instructions

获取当前设备的 VPN 信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execution handler for the 'getVpnInfo' tool. It fetches all network interfaces using os.networkInterfaces(), identifies potential VPN interfaces by checking for names starting with 'tun' or 'ppp', extracts relevant details (address, netmask, family, internal), and returns them as a JSON-formatted text content block.
    case "getVpnInfo": {
      const networkInterfaces = os.networkInterfaces();
      const vpnInterfaces: Record<string, any> = {};
    
      for (const [interfaceName, interfaces = []] of Object.entries(networkInterfaces)) {
        // 检测常见的 VPN 接口名称(如 tun0, ppp0, etc)
        if (interfaceName.startsWith('tun') || interfaceName.startsWith('ppp')) {
          vpnInterfaces[interfaceName] = interfaces.map((info) => ({
            address: info.address,
            netmask: info.netmask,
            family: info.family,
            internal: info.internal
          }));
        }
      }
    
      return {
        content: [{
          type: "text",
          text: JSON.stringify(vpnInterfaces, null, 2)
        }]
      };
  • src/index.ts:137-144 (registration)
    Registration of the 'getVpnInfo' tool in the list returned by the ListToolsRequestSchema handler, including its name, description, and input schema.
      name: "getVpnInfo",
      description: "获取当前设备的 VPN 信息",
      inputSchema: {
        type: "object",
        properties: {},
        required: []
      }
    },
  • Input schema for the 'getVpnInfo' tool, defining an empty object (no required parameters).
    inputSchema: {
      type: "object",
      properties: {},
      required: []
    }
  • src/index.ts:790-790 (registration)
    Registration of the CallToolRequestSchema handler function, which routes tool calls to their respective switch case implementations, including 'getVpnInfo'.
    server.setRequestHandler(CallToolRequestSchema, handleCallToolRequest);
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While '获取' implies a read-only operation, the description doesn't explicitly state whether this requires permissions, what format the VPN information returns, whether it's real-time or cached data, or any error conditions. For a system information tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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 in Chinese that directly states the tool's purpose without any unnecessary words. It's appropriately sized for a simple information retrieval tool and front-loads the core functionality.

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 this is a simple read-only information retrieval tool with no parameters and no output schema, the description is minimally adequate. However, without annotations or output schema, it should ideally provide more context about what specific VPN information is returned (connection status, server details, protocols, etc.) to help the agent understand what to expect.

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 with 100% schema description coverage. The description appropriately doesn't discuss parameters since none exist. It focuses on what information will be retrieved rather than how to request it, which is correct for a parameterless tool.

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 ('获取' meaning 'get') and resource ('当前设备的 VPN 信息' meaning 'current device's VPN information'), providing a specific verb+resource combination. It distinguishes itself from siblings like getNetworkInfo or getProxyInfo by focusing specifically on VPN information. However, it doesn't explicitly contrast with these alternatives in the description text itself.

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 getNetworkInfo or getProxyInfo. There's no mention of prerequisites, context, or specific use cases. The agent must infer usage from the tool name and description alone without explicit direction.

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