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

Function optionalString

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

Source from the content-addressed store, hash-verified

66}
67
68function optionalString(args: Record<string, unknown>, key: string): string | undefined {
69 const value = args[key]
70 if (value == null) return undefined
71 if (typeof value !== 'string') throw new Error(`${key} must be a string`)
72 return value
73}
74
75function requireFolder(args: Record<string, unknown>, key: string): NoteFolder {
76 const value = requireString(args, key)

Callers 1

server.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected