koala73/worldmonitor · error · SafeWebMcpError
scope must be one of: all, signals, map, panels, actions.
Error message
scope must be one of: all, signals, map, panels, actions.
What it means
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.
Solutions
- Use one of the enumerated scopes or omit scope entirely to default to all
- Update the calling client to the current scope list
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/services/webmcp.ts:772 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of koala73/worldmonitor@e586b8b4b8 (2026-08-21).
Data as JSON: /api/errors/9e78354d370e4323.
Report an issue: GitHub.
Appendix: source
Thrown at src/services/webmcp.ts:2554
timeRange: args.timeRange,
}, app, extra)
), trackEvent),
},
{
name: WEBMCP_SPA_TOOL.focusCountry,
title: 'Focus Country On Map',
description:
'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.',
inputSchema: {
type: 'object',
properties: {
iso2: {
type: 'string',
description: 'ISO 3166-1 alpha-2 country code, uppercase.',
pattern: DASHBOARD_COUNTRY_CODE_PATTERN,
},
},
required: ['iso2'],
additionalProperties: false,
},
annotations: { readOnlyHint: false },
execute: withBindings(WEBMCP_SPA_TOOL.focusCountry, async (args, extra) => {
const iso2 = typeof args.iso2 === 'string' ? args.iso2.toUpperCase() : '';
if (!ISO2.test(iso2)) {
throw new SafeWebMcpError(
'iso2 must be an ISO 3166-1 alpha-2 code, such as "DE" or "IR".',
'validation',
);
}
return applyDashboardAction({
type: 'focus_country',
iso2,
}, app, extra);
}, trackEvent),
},
{View on GitHub (pinned to e586b8b4b8)