koala73/worldmonitor · error · SafeWebMcpError
Dashboard action result exceeded the safe output limit.
Error message
Dashboard action result exceeded the safe output limit.
What it means
The WebMCP dashboard-action result sanitizer detected that the serialized action result exceeds the safe output limit even after bounding each text field (message 240 chars, target fields 96/64 chars). This is a size guard on the MCP tool response: the action produced an unexpectedly large payload (typically too many targets) and the bounded envelope would still be too big to return.
Solutions
- Reduce the action's output size at the source (fewer targets, shorter messages) before serialization
- Trim the targets array and set targetsTruncated to fit the limit instead of failing
- Add a unit test asserting the bounded envelope stays under the limit for worst-case inputs
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/services/webmcp.ts:456 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/e2c340369c198075.
Report an issue: GitHub.
Appendix: source
Thrown at src/services/webmcp.ts:628
'techhq',
'accelerator',
'exchange',
'financialcenter',
'centralbank',
'commodityhub',
'flight',
]);
const TOOL_FAILURE_MESSAGES: Record<WebMcpSpaToolName, string> = {
openCountryBrief: 'World Monitor could not open that country brief.',
openSearch: 'World Monitor could not open search.',
get_dashboard_context: 'World Monitor could not read dashboard context.',
list_map_layers: 'World Monitor could not list map layers.',
list_dashboard_panels: 'World Monitor could not list dashboard panels.',
switch_monitor: 'World Monitor could not switch monitors.',
open_settings: 'World Monitor could not open settings.',
open_alerts: 'World Monitor could not open alerts.',
open_dashboard_panel: 'World Monitor could not open that dashboard panel.',
set_panel_enabled: 'World Monitor could not update that dashboard panel.',
get_panel_layout: 'World Monitor could not read the panel layout.',
set_panel_collapsed: 'World Monitor could not update that panel collapse state.',
move_panel: 'World Monitor could not move that panel.',
set_panel_fullscreen: 'World Monitor could not update that panel fullscreen state.',
set_map_view: 'World Monitor could not move the map.',
set_map_layers: 'World Monitor could not update map layers.',
set_time_range: 'World Monitor could not set the map time range.',
focus_country: 'World Monitor could not focus that country.',
set_map_mode: 'World Monitor could not switch the map mode.',
search_dashboard: 'World Monitor could not search the dashboard.',
open_search_result: 'World Monitor could not open that search result.',
list_dashboard_tabs: 'World Monitor could not list dashboard tabs.',
select_dashboard_tab: 'World Monitor could not select that dashboard tab.',
create_dashboard_tab: 'World Monitor could not create that dashboard tab.',
rename_dashboard_tab: 'World Monitor could not rename that dashboard tab.',
delete_dashboard_tab: 'World Monitor could not delete that dashboard tab.',
list_mission_presets: 'World Monitor could not list mission presets.',
apply_mission_preset: 'World Monitor could not apply that mission preset.',View on GitHub (pinned to e586b8b4b8)