koala73/worldmonitor · error · SafeWebMcpError

search_dashboard accepts only query, scope, and limit.

Error message

search_dashboard accepts only query, scope, and limit.

What it means

Validation error text for the search_dashboard WebMCP tool's argument guard: the execute wrapper checks that args contains only the keys query, scope, and limit. Any additional property (or a misspelled key) is rejected up front with this message before per-field validation runs, mirroring the schema's additionalProperties: false.

Source

Thrown at src/services/webmcp.ts:2456

            description: 'Optional dashboard surface to search.',
            enum: [...DASHBOARD_SEARCH_SCOPES],
            default: 'all',
          },
          limit: {
            type: 'integer',
            description: 'Maximum number of concise results to return.',
            minimum: 1,
            maximum: MAX_SEARCH_RESULTS,
            default: DEFAULT_SEARCH_RESULTS,
          },
        },
        required: ['query'],
        additionalProperties: false,
      },
      annotations: { readOnlyHint: true, untrustedContentHint: true },
      execute: withInvocationLogging(WEBMCP_SPA_TOOL.searchDashboard, async (args, extra) => {
        if (!hasOnlyOwnKeys(args, ['query', 'scope', 'limit'])) {
          throw new SafeWebMcpError(
            'search_dashboard accepts only query, scope, and limit.',
            'validation',
          );
        }
        if (typeof args.query !== 'string') {
          throw new SafeWebMcpError('query must be a string.', 'validation');
        }
        if (args.query.length > MAX_SEARCH_QUERY_CHARS) {
          throw new SafeWebMcpError(
            `query must be at most ${MAX_SEARCH_QUERY_CHARS} characters.`,
            'validation',
          );
        }
        const query = args.query.trim();
        if (!query) throw new SafeWebMcpError('query must not be empty.', 'validation');

        const scope = args.scope === undefined ? 'all' : args.scope;
        if (typeof scope !== 'string' || !DASHBOARD_SEARCH_SCOPES.has(scope as DashboardSearchScope)) {

View on GitHub (pinned to 9361220cc0)

Solutions

  1. Send only the supported arguments: query (string), scope, and limit. Remove any extra properties from the tool arguments object.
  2. If a new parameter seems necessary, extend the tool's schema and validation in src/services/webmcp.ts rather than bypassing the check.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/services/webmcp.ts:753 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of koala73/worldmonitor@9361220cc0 (2026-08-27). Data as JSON: /api/errors/1411d9eb0be7f40a. Report an issue: GitHub.