MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / optionalStringArray

Function optionalStringArray

apps/desktop/src/mcp/server.ts:92–99  ·  view source on GitHub ↗
(args: Record<string, unknown>, key: string)

Source from the content-addressed store, hash-verified

90}
91
92function optionalStringArray(args: Record<string, unknown>, key: string): string[] | undefined {
93 const value = args[key]
94 if (value == null) return undefined
95 if (!Array.isArray(value) || !value.every((v) => typeof v === 'string')) {
96 throw new Error(`${key} must be an array of strings`)
97 }
98 return value as string[]
99}
100
101/* ---------- Tool definitions ----------------------------------------- */
102

Callers 1

server.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected