# Tool Output Trusted Verbatim

> Feeding raw tool output directly into the model's context — no validation, no schema check, no size cap, no sanitization.

- **Category**: Agentic AI
- **Subcategory**: Anti-Patterns
- **Canonical URL**: https://designpattern.fyi/patterns/tool_output_trusted_verbatim/

---

## Description
**Intent**: Accepting whatever a tool returns at face value and injecting it directly into the model''s context — no schema check, no size limit, no trust label, no escape pass over instruction-shaped content.

**Context**: Tools return 200 OK with error bodies, 50MB JSON blobs, and HTML with embedded instructions. The team assumed tools return well-formed, honest, bounded JSON. They don''t.

**Solution**: Validate every tool result against a schema. Cap response size. Sanitize HTML. Apply tool-output-poisoning defenses. See tool-output-poisoning, structured-output, input-output-guardrails.



## Use Cases
- Never use this; real tools return errors as 200 OK, oversized bodies, and injected text.
- Validate every tool result against a schema and enforce a response size cap.
- Apply tool-output-poisoning defenses and structured-output validation downstream.






## Trade-offs




### Considerations & Drawbacks

- Silent context corruption when tool output doesn''t match the expected shape

- Indirect prompt injection succeeds — instructions embedded in tool responses run as agent commands

- Context overflow from unbounded tool responses crashes or degrades the run







---
**Reference**: [Original Source](https://www.agentpatternscatalog.org/patterns/tool-output-trusted-verbatim/)

