koala73/worldmonitor · error · SafeWebMcpError
Dashboard search result exceeded the safe output limit.
Error message
Dashboard search result exceeded the safe output limit.
What it means
SafeWebMcpError thrown by the dashboard search tool when, after iteratively popping results down to the output target, the bounded response still exceeds MAX_OUTPUT_CHARS. The graceful shrink loop failed to bring an (extremely large or pathological) result set under the hard cap, so the search refuses to return it.
Source
Thrown at src/services/webmcp.ts:1156
let truncated = result.truncated === true || results.length < sourceResults.length;
const bounded: DashboardSearchResponse = {
queryLength: Math.max(0, Math.floor(boundedNumber(result.queryLength))),
results,
resultCount: results.length,
truncated,
};
while (
JSON.stringify(bounded).length > DASHBOARD_SEARCH_OUTPUT_TARGET_CHARS
&& results.length > 0
) {
results.pop();
truncated = true;
bounded.resultCount = results.length;
bounded.truncated = truncated;
}
if (JSON.stringify(bounded).length > MAX_OUTPUT_CHARS) {
throw new SafeWebMcpError('Dashboard search result exceeded the safe output limit.');
}
return bounded;
}
function boundOpenSignInResult(result: OpenSignInResult): OpenSignInResult {
if (result?.ok === true && result.status === 'already_open') {
return { ok: true, status: 'already_open', reason: 'already_open' };
}
if (result?.ok === true && result.status === 'opened') {
return { ok: true, status: 'opened' };
}
return { ok: false, status: 'denied', reason: 'clerk_unavailable' };
}
function boundSearchOpenResult(result: DashboardSearchOpenResult): DashboardSearchOpenResult {
const opened = result.ok === true && result.status === 'opened';
const reason = result.reason && DASHBOARD_SEARCH_OPEN_REASONS.has(result.reason)
? result.reasonView on GitHub (pinned to 9361220cc0)
Solutions
- Retry with a smaller limit parameter or a narrower scope
- Make the search result renderer trim per-entry text so shrink iterations converge faster
- Investigate entries with abnormally long content that defeat truncation
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/services/webmcp.ts:493 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of koala73/worldmonitor@9361220cc0 (2026-08-21).
Data as JSON: /api/errors/b32e5b3f12823e82.
Report an issue: GitHub.