Skip to main content
Glama
JackXuyi

Current operating environment

getIpv6Info

Retrieve IPv6 address details for the current device to identify network configuration and connectivity status.

Instructions

获取当前设备的 IPv6 信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler implementation for the 'getIpv6Info' tool. It retrieves all network interfaces using os.networkInterfaces(), filters for IPv6 addresses, structures the data by interface, and returns it as JSON text.
    case "getIpv6Info": { const networkInterfaces = os.networkInterfaces(); const ipInfo: Record<string, { address: string; netmask: string; family: string; internal: boolean }[]> = {}; for (const [interfaceName, interfaces = []] of Object.entries(networkInterfaces)) { const ipv6Interfaces = interfaces .filter((info) => info.family === 'IPv6') .map((info) => ({ address: info.address, netmask: info.netmask, family: info.family, internal: info.internal })); if (ipv6Interfaces.length > 0) { ipInfo[interfaceName] = ipv6Interfaces; } } return { content: [{ type: "text", text: JSON.stringify(ipInfo, null, 2) }] };
  • Schema definition for the 'getIpv6Info' tool, including name, description, and input schema (empty object as no parameters required). This is part of the tools list returned by ListToolsRequest.
    { name: "getIpv6Info", description: "获取当前设备的 IPv6 信息", inputSchema: { type: "object", properties: {}, required: [] } },
  • src/index.ts:790-790 (registration)
    Registration of the CallToolRequest handler function, which contains the switch case dispatching to the getIpv6Info implementation.
    server.setRequestHandler(CallToolRequestSchema, handleCallToolRequest);

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