# RAG Poison Shield

> RAG Poison Shield is a paid API for AI agents from mcp-gateway.agentdiet.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-22).

Detects and filters RAG poisoning attempts in text input, returning a compression/analysis result with an ROI proof.

## Facts

- Endpoint: GET https://mcp-gateway.agentdiet.dev/v1/rag-poison-shield?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rag-poison-shield-8baa61a8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gyRT9VWQ4HkQqLoqbmDCb

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability rag-poison-shield-8baa61a8
```

Example prompt: Can you run this text through the RAG poison shield to check if it contains any adversarial content or RAG poisoning attempts before I index it into my knowledge base?

## When to prefer this

Choose this endpoint when you need to validate text before ingesting it into a RAG or vector-store pipeline and want a lightweight, pay-per-call shield with an ROI/compression proof. Prefer it over generic content moderation APIs when your threat model specifically involves adversarial RAG poisoning, prompt injection via retrieved documents, or manipulation of embedding-based retrieval systems.

## Known failure modes

- Missing required 'input' object returns validation error
- Invalid method enum value (not GET or POST) causes schema rejection
- Empty or malformed text query parameter may yield inconclusive results
- Payment failure (insufficient USDC balance) results in 402 response
- Service unavailability returns non-200 status with no data

## How this service works

Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://mcp-gateway.agentdiet.dev settling in USDC on Base.

## Output

Returns a JSON object with a status field ('ok'), a data object containing analysis results, and an roi_proof object that includes a compression_ratio_pct indicating how much the content was compressed/analyzed (e.g. 91.4%). The response signals whether the input text is safe or flagged as a RAG poisoning attempt.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "text": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "status": "ok",
  "roi_proof": {
   "compression_ratio_pct": 91.4
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rag-poison-shield-8baa61a8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mcp-gateway.agentdiet.dev](https://www.zero.xyz/host/mcp-gateway.agentdiet.dev/llms.txt)
