MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / keyFor

Method keyFor

src/utils/tool-cache.ts:34–41  ·  view source on GitHub ↗
(toolName: string, args: any)

Source from the content-addressed store, hash-verified

32 private misses = 0;
33
34 private keyFor(toolName: string, args: any): string {
35 if (args === null || args === undefined) return toolName;
36 if (typeof args !== 'object') return `${toolName}:${String(args)}`;
37 const sortedKeys = Object.keys(args).sort();
38 const ordered: any = {};
39 for (const k of sortedKeys) ordered[k] = args[k];
40 return `${toolName}:${JSON.stringify(ordered)}`;
41 }
42
43 get(toolName: string, args: any): string | null {
44 const key = this.keyFor(toolName, args);

Callers 2

getMethod · 0.95
setMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected