MCPcopy Index your code
hub / github.com/simstudioai/sim / generateAliases

Function generateAliases

apps/sim/lib/search/tool-operations.ts:63–76  ·  view source on GitHub ↗

* Generates search aliases for an operation name by finding synonyms * for action verbs in the operation name.

(operationName: string)

Source from the content-addressed store, hash-verified

61 * for action verbs in the operation name.
62 */
63function generateAliases(operationName: string): string[] {
64 const aliases: string[] = []
65 const lowerName = operationName.toLowerCase()
66
67 for (const [verb, synonyms] of Object.entries(ACTION_VERB_ALIASES)) {
68 if (lowerName.includes(verb)) {
69 for (const synonym of synonyms) {
70 aliases.push(lowerName.replace(verb, synonym))
71 }
72 }
73 }
74
75 return aliases
76}
77
78/**
79 * Extracts the operation dropdown subblock from a block's configuration.

Callers 1

buildToolOperationsIndexFunction · 0.85

Calls 2

replaceMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected