UNPKG

matter-controller-mcp

Version:

An MCP server for Matter Controller, enabling AI agents to control and interact with Matter devices.

46 lines (45 loc) 1.67 kB
import { NodeId } from "@matter/types"; export declare namespace NodeIdUtils { /** * Parse hex string to NodeId */ function fromHexString(hexString: string): ReturnType<typeof NodeId>; /** * Parse input to NodeId, handling string inputs as hex strings */ function parseNodeId(input: string): ReturnType<typeof NodeId>; /** * Validate and normalize NodeId input from MCP protocol * Always returns decimal string format */ function validateAndNormalizeNodeId(input: string): string; } /** * Get the node structure as a formatted string using the diagnostic system * * @param node - The PairedNode instance * @param format - The format to use: 'plain' for plain text, 'ansi' for colored text * @returns A formatted string representation of the node structure with duplicate attributes filtered * * Usage examples: * - const plainStructure = getNodeStructureInfo(node); * - const coloredStructure = getNodeStructureInfo(node, 'ansi'); */ export declare function getNodeStructureInfo(node: any, format?: 'plain' | 'ansi'): string; export declare function serializeJson(data: any): string; /** * Recursively find all devices in a node, including nested child endpoints (aggregator pattern) */ export declare function findAllDevices(node: any): Array<{ endpoint: number; device: any; path: string; }>; /** * Find a device by endpoint ID, supporting nested child endpoints */ export declare function findDeviceByEndpoint(node: any, targetEndpointId: number): any | null; /** * Check if a device is a bridge/aggregator device */ export declare function isBridgeDevice(device: any): boolean;