{"record":{"id":"1f4b44674afe3ed4","repo":"paperclipai/paperclip","slug":"missing-value-for-arg","errorCode":null,"errorMessage":"Missing value for ${arg}","messagePattern":"Missing value for (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/google-sheets-mcp-server/src/config.ts","lineNumber":46,"sourceCode":"  serviceAccountJson?: string | null;\n  serviceAccountJsonPath?: string | null;\n  allowedSpreadsheetIds?: string | string[] | null;\n}\n\nexport interface GoogleSheetsMcpHttpConfigInput extends GoogleSheetsMcpConfigInput {\n  port?: string | number | null;\n  host?: string | null;\n  token?: string | null;\n}\n\nfunction parseArgs(argv: string[]): GoogleSheetsMcpConfigInput {\n  const input: GoogleSheetsMcpConfigInput = {};\n  for (let index = 0; index < argv.length; index += 1) {\n    const arg = argv[index];\n    const readValue = () => {\n      const next = argv[index + 1];\n      if (!next || next.startsWith(\"--\")) {\n        throw new Error(`Missing value for ${arg}`);\n      }\n      index += 1;\n      return next;\n    };\n    if (arg === \"--service-account-json\") input.serviceAccountJson = readValue();\n    if (arg === \"--service-account-json-path\") input.serviceAccountJsonPath = readValue();\n    if (arg === \"--allowed-spreadsheet-ids\") input.allowedSpreadsheetIds = readValue();\n  }\n  return input;\n}\n\nfunction parseAllowedSpreadsheetIds(raw: string | string[] | null | undefined): string[] {\n  const values = Array.isArray(raw) ? raw : String(raw ?? \"\").split(/[\\n,]/g);\n  const ids = values.map((value) => value.trim()).filter(Boolean);\n  return Array.from(new Set(ids));\n}\n\nfunction parsePort(raw: string | number | null | undefined): number {","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/google-sheets-mcp-server/src/config.ts#L28-L64","documentation":"Error \"Missing value for ${arg}\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/google-sheets-mcp-server/src/config.ts:46 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a value after the named CLI argument, e.g. `--port 3000` instead of a bare `--port`."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}