LLM prompt security analysis — detect prompt injections, jailbreaks, and other attacks
Single tool 'analyze_prompt' has a clear, descriptive docstring (194 chars) and well-documented parameters with types. Input schema is visible and properly typed (prompt: string, session_id: optional string). However, output schema is not documented, the tool returns result.to_dict() but the LLM has no visibility into what fields that dict contains (risk_score, decision, categories, evidence are mentioned in the docstring but not formally specified). Parameter descriptions are good (72+ chars each), explaining the session_id's stateful behavior. No enum constraints, no pagination, no error handling guidance. Tool naming is clear (analyze_prompt) and follows verb_noun convention. Overall solid for a single-purpose security tool, but lacks output schema documentation and error recovery patterns.
Analyze a prompt for security risks including prompt injection, jailbreaks, and other LLM attacks.
Output schema not formally documented. Tool returns result.to_dict() with fields (risk_score, decision, categories, evidence) mentioned only in docstring text, not in a structured schema. LLMs cannot reliably extract or chain on undocumented output fields.
No error handling guidance. Tool provides no recovery hints for failure cases (e.g., invalid prompt format, engine initialization failure, session state corruption). LLM has no actionable next step on error.
No input validation or constraint documentation. Prompt parameter accepts any string with no length limits, encoding constraints, or format guidance. LLM could pass extremely long or malformed input.
Session state management underdocumented. session_id parameter enables stateful detection but lacks guidance on session lifecycle, cleanup, or limits. LLM may accumulate unbounded state across sessions.
Inferred effective spec: 2026-07-28+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 62 | 2026-07-28+ | v2 |
No tool annotations (readOnlyHint, idempotentHint). Tool is read-only and idempotent but does not declare these via MCP tool annotations, forcing LLM to infer safety properties.