Reality-check layer for AI agents — risk detection, action gating, consequence simulation, MCP tool for Claude Code and Cursor.
WorldSense exposes three safety-focused tools with complete input schemas and reasonable descriptions (avg 180 chars, within baseline 194). All parameters are typed and described. However, output schemas are undocumented (tools return JSON-serialized Pydantic models with no schema guidance), error handling lacks recovery guidance, and tool names use generic verbs ('analyze', 'evaluate', 'check') that don't clearly distinguish their specific safety concerns. No tool annotations (readOnlyHint, destructiveHint) despite all being read-only. Parameter descriptions are adequate but lack format constraints and examples of valid inputs.
Analyze a user message (and optionally a proposed AI response or planned action) for hidden risks, missing context, real-world consequences, and practical constraint violations. Returns a structured risk assessment with recommendations and rewrite guidance.
Check a proposed AI response against the original user message for overconfidence, social risk, missing context, and unsafe recommendations. Returns rewrite guidance and risk level.
Evaluate whether an agent action (file deletion, shell command, email send, database write, API call, etc.) is safe to execute. Returns allow/warn/require_confirmation/block with rationale.
Output schemas undocumented. Tools return JSON-serialized Pydantic models (result.model_dump_json()) but provide no schema guidance to LLMs about expected fields, types, or structure. LLMs cannot plan downstream actions or extract specific risk fields without reverse-engineering the output.
Tool names lack specificity. 'analyze', 'evaluate_action', 'check_response' are generic verbs that don't convey the safety/risk-assessment domain. Names like 'assess_message_risk', 'gate_action_safety', 'validate_response_safety' would better signal intent and help LLMs distinguish these tools from generic analysis tools.
No tool annotations. All three tools are read-only (no side effects), but lack readOnlyHint annotation. This forces LLMs to infer safety from descriptions rather than machine-readable metadata, increasing reasoning overhead and risk of misclassification.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 64 | 2026-07-28+ | v2 |
Error handling lacks recovery guidance. _handle_tool_call returns 'Unknown tool: {name}' with isError=true, but provides no actionable next step. Per pattern:recovery-guide, errors should suggest alternatives or corrective actions.
Parameter descriptions lack format constraints. 'tool' param in worldsense_evaluate_action lists examples ('filesystem.delete', 'shell.run', 'email.send') but no enum or pattern constraint. LLMs may hallucinate invalid tool types. Should use enum or regex pattern.