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

Function requireString

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

Source from the content-addressed store, hash-verified

58/* ---------- Argument helpers ----------------------------------------- */
59
60function requireString(args: Record<string, unknown>, key: string): string {
61 const value = args[key]
62 if (typeof value !== 'string' || !value.trim()) {
63 throw new Error(`Missing required string argument: ${key}`)
64 }
65 return value
66}
67
68function optionalString(args: Record<string, unknown>, key: string): string | undefined {
69 const value = args[key]

Callers 2

requireFolderFunction · 0.85
server.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected