{"record":{"id":"8d4f897113b2fbf1","repo":"koala73/worldmonitor","slug":"query-must-be-at-most-max-search-query-chars-ch","errorCode":null,"errorMessage":"query must be at most ${MAX_SEARCH_QUERY_CHARS} characters.","messagePattern":"query must be at most (.+?) characters\\.","errorType":"validation","errorClass":"SafeWebMcpError","httpStatus":null,"severity":"error","filePath":"src/services/webmcp.ts","lineNumber":2544,"sourceCode":"            enum: [...DASHBOARD_TIME_RANGES],\n          },\n        },\n        required: ['timeRange'],\n        additionalProperties: false,\n      },\n      annotations: { readOnlyHint: false },\n      execute: withBindings(WEBMCP_SPA_TOOL.setTimeRange, async (args, extra) => (\n        applyDashboardAction({\n          type: 'set_time_range',\n          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\".',","sourceCodeStart":2526,"sourceCodeEnd":2562,"githubUrl":"https://github.com/koala73/worldmonitor/blob/e586b8b4b80f595aa7ece295eec10d76f2921240/src/services/webmcp.ts#L2526-L2562","documentation":"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.","triggerScenarios":"Thrown at src/services/webmcp.ts:762 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Shorten the query to within the stated character limit","Use more specific search terms instead of pasting large text"],"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"}