koala73/worldmonitor · error · SafeWebMcpError
query must be a string.
Error message
query must be a string.
What it means
SafeWebMcpError thrown by the search_dashboard tool's execute guard when the query argument is not a string (missing, number, object, etc.). It is a manual input-shape check that backstops the JSON schema, classed as a validation error for the MCP client.
Solutions
- Send query as a JSON string in the tool arguments
- Fix the calling MCP client's argument serialization
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/services/webmcp.ts:759 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/0a616860cb5af92b.
Report an issue: GitHub.
Appendix: source
Thrown at src/services/webmcp.ts:2541
timeRange: {
type: 'string',
description: 'Dashboard time-range control value.',
enum: [...DASHBOARD_TIME_RANGES],
},
},
required: ['timeRange'],
additionalProperties: false,
},
annotations: { readOnlyHint: false },
execute: withBindings(WEBMCP_SPA_TOOL.setTimeRange, async (args, extra) => (
applyDashboardAction({
type: 'set_time_range',
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() : '';View on GitHub (pinned to e586b8b4b8)