MCPcopy Index your code
hub / github.com/anomalyco/opencode / toolName

Function toolName

packages/opencode/src/mcp/catalog.ts:119–119  ·  view source on GitHub ↗
(clientName: string, name: string)

Source from the content-addressed store, hash-verified

117export const sanitize = (value: string) => value.replace(/[^a-zA-Z0-9_-]/g, "_")
118
119export const toolName = (clientName: string, name: string) => sanitize(clientName) + "_" + sanitize(name)
120
121export function prompts(client: Client, timeout?: number) {
122 if (!client.getServerCapabilities()?.prompts) return Promise.resolve([])

Callers

nothing calls this directly

Calls 1

sanitizeFunction · 0.70

Tested by

no test coverage detected