koala73/worldmonitor · error · SafeWebMcpError

limit must be an integer from 1 to

Error message

limit must be an integer from 1 to ${MAX_SEARCH_RESULTS}.

What it means

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.

Solutions

  1. Send limit as an integer within the advertised schema range
  2. Omit limit to accept the default result count
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/services/webmcp.ts:779 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/35b0d9fdb1e4efd2. Report an issue: GitHub.

Appendix: source

Thrown at src/services/webmcp.ts:2482

            properties: { lat: {}, lon: {} },
            required: ['lat', 'lon'],
            not: { properties: { view: {} }, required: ['view'] },
          },
        ],
        additionalProperties: false,
      },
      annotations: { readOnlyHint: false },
      execute: withBindings(WEBMCP_SPA_TOOL.setMapView, async (args, extra) => (
        applyDashboardAction({
          type: 'set_view',
          view: args.view,
          lat: args.lat,
          lon: args.lon,
          zoom: args.zoom,
        }, app, extra)
      ), trackEvent),
    },
    {
      name: WEBMCP_SPA_TOOL.setMapLayers,
      title: 'Set Map Layers',
      description:
        'Enable or disable explicit visible map layers through World Monitor’s variant, renderer, and entitlement-aware control path.',
      inputSchema: {
        type: 'object',
        properties: {
          layers: {
            type: 'object',
            description: 'Map layer IDs mapped to true (enable) or false (disable).',
            minProperties: 1,
            maxProperties: MAX_LAYER_ACTION_TARGETS,
            propertyNames: {
              type: 'string',
              minLength: 1,
              maxLength: MAX_LAYER_ACTION_TARGET_ID_LENGTH,
              pattern: DASHBOARD_LAYER_ACTION_TARGET_ID_PATTERN,
            },

View on GitHub (pinned to e586b8b4b8)