MCPcopy Create free account
hub / github.com/allocnode/oh-my-sage / formatVariableListMarkdown

Function formatVariableListMarkdown

src/mcp/utils.ts:181–198  ·  view source on GitHub ↗
(
  variables: Array<{ userData?: { name?: string }; type?: string; value?: unknown }>,
  scope: string
)

Source from the content-addressed store, hash-verified

179 lines.push(`- ${device.name} (${device.did}) | ${device.roomName || "未分组"} | ${device.modelName || "未知"} | ${onlineTag(device.online)}`);
180 }
181 return lines.join("\n");
182}
183
184/** 设备摘要中的属性 */
185export interface DevicePropertySummary {
186 siid: number;
187 piid: number;
188 desc: string;
189 dtype: string;
190 access: string;
191 unit?: string;
192 range?: MiotValueRange;
193 values?: Array<{ v: MiotValueListItem["value"]; d: string }>;
194 valuesTruncated?: number;
195}
196
197/** 设备摘要 */
198export interface DeviceSummary {
199 did: string;
200 found: boolean;
201 name?: string;

Callers 1

registerVariableToolsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected