koala73/worldmonitor · warning · SafeWebMcpError

The search palette did not become visible.

Error message

The search palette did not become visible.

What it means

The WEBMCP_SPA_TOOL.openSearch tool calls app.openSearch(extra); if the return value is not exactly true (the palette did not visibly open), it throws this SafeWebMcpError with reason 'unavailable'. The tool contract requires visible UI, so a no-op or blocked open is reported as an error to the agent.

Solutions

  1. Retry after the dashboard finishes loading / the blocking overlay is dismissed, then call openSearch again
  2. Fall back to direct search interaction (query the search API or navigate to the search route) instead of the palette
  3. Verify no app state (modals, embedded mode, reduced-UI flags) prevents the palette from showing
  4. If openSearch systematically returns non-true, file a bug with the app state at call time

Example fix

// before
const opened = await app.openSearch(extra);
if (opened !== true) throw new SafeWebMcpError('The search palette did not become visible.', 'unavailable');
// after
const opened = await app.openSearch(extra);
if (opened !== true) {
  await dismissBlockingOverlays(app);
  if (await app.openSearch(extra) !== true) throw new SafeWebMcpError('The search palette did not become visible.', 'unavailable');
}
Defensive patterns

Strategy: fallback

Validate before calling

if (!appReady) { await waitForAppReady(); }

Try / catch

try { await callWebMcpTool('openSearch'); } catch (e) { if (e.message.includes('search palette')) { await navigateToSearchRoute(); } else throw e; }

Prevention

When it happens

Trigger: Calling the openSearch WebMCP tool when the app cannot make the search palette visible — e.g. the SPA route/controller refuses to open search, another modal/overlay blocks it, or the app is in a state where openSearch returns false/undefined.

Common situations: Automation invoking openSearch while the dashboard is still booting; the palette suppressed by app state (e.g. a fullscreen overlay, embedded mode, or keyboard-input capture); UI regression making openSearch return non-true.

Related errors


AI-assisted analysis of koala73/worldmonitor@7d06c8633d (2026-09-15). Data as JSON: /api/errors/92af0ab307a2c52c. Report an issue: GitHub.

Appendix: source

Thrown at src/services/webmcp.ts:1909

        }
        return `Opened intelligence brief for ${name} (${iso2}).`;
      }, trackEvent),
    },
    {
      name: WEBMCP_SPA_TOOL.openSearch,
      title: 'Open Search',
      description:
        'Open the global search command palette so the user can find countries, signals, alerts, and other entities tracked by World Monitor.',
      inputSchema: {
        type: 'object',
        properties: {},
        additionalProperties: false,
      },
      annotations: { readOnlyHint: false },
      execute: withBindings(WEBMCP_SPA_TOOL.openSearch, async (_args, extra) => {
        const opened = await app.openSearch(extra);
        if (opened !== true) {
          throw new SafeWebMcpError(
            'The search palette did not become visible.',
            'unavailable',
          );
        }
        return 'Opened search palette.';
      }, trackEvent),
    },
    {
      name: WEBMCP_SPA_TOOL.getDashboardContext,
      title: 'Get Dashboard Context',
      description:
        'Read a bounded snapshot of the visible dashboard: active variant, map view, center, zoom, map mode (2d or 3d), time range, enabled layers, and mounted or enabled panel IDs.',
      inputSchema: {
        type: 'object',
        properties: {},
        additionalProperties: false,
      },
      annotations: { readOnlyHint: true },

View on GitHub (pinned to 7d06c8633d)