{"record":{"id":"9e78354d370e4323","repo":"koala73/worldmonitor","slug":"scope-must-be-one-of-all-signals-map-panels-a","errorCode":null,"errorMessage":"scope must be one of: all, signals, map, panels, actions.","messagePattern":"scope must be one of: all, signals, map, panels, actions\\.","errorType":"validation","errorClass":"SafeWebMcpError","httpStatus":null,"severity":"error","filePath":"src/services/webmcp.ts","lineNumber":2554,"sourceCode":"          timeRange: args.timeRange,\n        }, app, extra)\n      ), trackEvent),\n    },\n    {\n      name: WEBMCP_SPA_TOOL.focusCountry,\n      title: 'Focus Country On Map',\n      description:\n        'Focus the visible map on a country bounding box by ISO 3166-1 alpha-2 code without opening a country brief or consuming briefing quota.',\n      inputSchema: {\n        type: 'object',\n        properties: {\n          iso2: {\n            type: 'string',\n            description: 'ISO 3166-1 alpha-2 country code, uppercase.',\n            pattern: DASHBOARD_COUNTRY_CODE_PATTERN,\n          },\n        },\n        required: ['iso2'],\n        additionalProperties: false,\n      },\n      annotations: { readOnlyHint: false },\n      execute: withBindings(WEBMCP_SPA_TOOL.focusCountry, async (args, extra) => {\n        const iso2 = typeof args.iso2 === 'string' ? args.iso2.toUpperCase() : '';\n        if (!ISO2.test(iso2)) {\n          throw new SafeWebMcpError(\n            'iso2 must be an ISO 3166-1 alpha-2 code, such as \"DE\" or \"IR\".',\n            'validation',\n          );\n        }\n        return applyDashboardAction({\n          type: 'focus_country',\n          iso2,\n        }, app, extra);\n      }, trackEvent),\n    },\n    {","sourceCodeStart":2536,"sourceCodeEnd":2572,"githubUrl":"https://github.com/koala73/worldmonitor/blob/e586b8b4b80f595aa7ece295eec10d76f2921240/src/services/webmcp.ts#L2536-L2572","documentation":"SafeWebMcpError thrown by search_dashboard when the optional scope argument is present but not one of the allowed dashboard surfaces (all, signals, map, panels, actions). The enum guard protects the downstream search router from unknown scopes.","triggerScenarios":"Thrown at src/services/webmcp.ts:772 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the enumerated scopes or omit scope entirely to default to all","Update the calling client to the current scope list"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e586b8b4b80f595aa7ece295eec10d76f2921240","analyzedAt":"2026-08-21T16:51:25.751Z","contentChangedAt":"2026-08-21T16:51:25.751Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}