koala73/worldmonitor · error · SafeWebMcpError
query must be at most
Error message
query must be at most ${MAX_SEARCH_QUERY_CHARS} characters. What it means
A SafeWebMcpError of kind 'validation' thrown by the search_dashboard WebMCP tool when the query argument exceeds MAX_SEARCH_QUERY_CHARS characters. It fires after confirming query is a string but before executing the search, rejecting oversized inputs that would waste tokens or degrade search performance. It is a generic input-length validation guard; the input at fault is an overly long query string. Callers must shorten the query below the maximum length and retry.
Solutions
- Shorten the query to within the stated character limit
- Use more specific search terms instead of pasting large text
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/services/webmcp.ts:762 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/8d4f897113b2fbf1.
Report an issue: GitHub.
Appendix: source
Thrown at src/services/webmcp.ts:2544
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() : '';
if (!ISO2.test(iso2)) {
throw new SafeWebMcpError(
'iso2 must be an ISO 3166-1 alpha-2 code, such as "DE" or "IR".',View on GitHub (pinned to e586b8b4b8)