{"record":{"id":"35b0d9fdb1e4efd2","repo":"koala73/worldmonitor","slug":"limit-must-be-an-integer-from-1-to-max-search-re","errorCode":null,"errorMessage":"limit must be an integer from 1 to ${MAX_SEARCH_RESULTS}.","messagePattern":"limit must be an integer from 1 to (.+?)\\.","errorType":"validation","errorClass":"SafeWebMcpError","httpStatus":null,"severity":"error","filePath":"src/services/webmcp.ts","lineNumber":2482,"sourceCode":"            properties: { lat: {}, lon: {} },\n            required: ['lat', 'lon'],\n            not: { properties: { view: {} }, required: ['view'] },\n          },\n        ],\n        additionalProperties: false,\n      },\n      annotations: { readOnlyHint: false },\n      execute: withBindings(WEBMCP_SPA_TOOL.setMapView, async (args, extra) => (\n        applyDashboardAction({\n          type: 'set_view',\n          view: args.view,\n          lat: args.lat,\n          lon: args.lon,\n          zoom: args.zoom,\n        }, app, extra)\n      ), trackEvent),\n    },\n    {\n      name: WEBMCP_SPA_TOOL.setMapLayers,\n      title: 'Set Map Layers',\n      description:\n        'Enable or disable explicit visible map layers through World Monitor’s variant, renderer, and entitlement-aware control path.',\n      inputSchema: {\n        type: 'object',\n        properties: {\n          layers: {\n            type: 'object',\n            description: 'Map layer IDs mapped to true (enable) or false (disable).',\n            minProperties: 1,\n            maxProperties: MAX_LAYER_ACTION_TARGETS,\n            propertyNames: {\n              type: 'string',\n              minLength: 1,\n              maxLength: MAX_LAYER_ACTION_TARGET_ID_LENGTH,\n              pattern: DASHBOARD_LAYER_ACTION_TARGET_ID_PATTERN,\n            },","sourceCodeStart":2464,"sourceCodeEnd":2500,"githubUrl":"https://github.com/koala73/worldmonitor/blob/e586b8b4b80f595aa7ece295eec10d76f2921240/src/services/webmcp.ts#L2464-L2500","documentation":"SafeWebMcpError thrown by search_dashboard when the optional limit argument is outside the allowed integer range 1..MAX_SEARCH_RESULTS (non-integer, zero, negative, or too large). It bounds result-set size before the search runs.","triggerScenarios":"Thrown at src/services/webmcp.ts:779 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send limit as an integer within the advertised schema range","Omit limit to accept the default result count"],"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"}