# AgentDiet Tool Poisoning Shield

> AgentDiet Tool Poisoning Shield is a paid API for AI agents from rag-diet.agentdiet.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-22).

Scans text for tool-poisoning attacks — malicious prompt injections or adversarial content embedded in tool outputs — and returns a safety verdict with compression metadata.

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/v1/tool-poisoning-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/agentdiet-tool-poisoning-shield-dee06f1a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YdzkxTBzpwwnHnqsJp4Af

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 agentdiet-tool-poisoning-shield-dee06f1a
```

Example prompt: Before I pass this tool response into my context window, can you run it through the AgentDiet tool-poisoning shield to check if it contains any embedded malicious instructions or prompt injection attempts?

## When to prefer this

Choose this endpoint when your agent pipeline ingests text from untrusted external sources — web scrapes, RAG retrievals, external API tool responses, or MCP outputs — and you need a lightweight, pay-per-call security gate that checks for embedded prompt injections or tool-poisoning attacks before that content reaches your LLM's context window. It is especially suited for A2A and agentic workflows using x402/L402 micropayment rails on Base.

## Known failure modes

- Missing or empty 'text' query parameter returns an error or empty analysis
- Non-string input types may be rejected by schema validation
- Network timeout if the text payload is excessively large
- Payment failure (x402) if USDC balance on Base is insufficient — returns 402 Payment Required
- Ambiguous or edge-case adversarial patterns may not be flagged with high confidence

## How this service works

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

## Output

Returns a JSON object with a 'status' field ('ok' or error), a 'data' object containing the safety analysis results, and an 'roi_proof' object that includes a compression_ratio_pct value (e.g. 91.4%) indicating how much the content was processed or reduced. A status of 'ok' with data payload confirms whether the scanned text is clean or flagged as poisoned.

## 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/agentdiet-tool-poisoning-shield-dee06f1a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rag-diet.agentdiet.dev](https://www.zero.xyz/host/rag-diet.agentdiet.dev/llms.txt)
