# Tool Permission Diff

> Tool Permission Diff is a paid API for AI agents from www.mahastrategies.com, paid per call via x402, $0.021/call, status unknown (last checked 2026-09-14).

Compares two explicit allow-only permission sets (before/after) by tool, action, and exact resource, reporting additions, removals, and wildcard additions before an agent release.

## Facts

- Endpoint: POST https://www.mahastrategies.com/api/v1/micro/tool-permission-diff
- Price: $0.021/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tool-permission-diff-11c87416
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CGFwRjidbNpWcuDUPo3AI

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 tool-permission-diff-11c87416 -d '<json body>'
```

Example prompt: Before I ship the new agent version, compare these two permission sets and tell me what changed — flag any additions, removals, or new wildcard permissions. The data is synthetic, and here are the before and after allow lists.

## When to prefer this

Use this endpoint when you need a lightweight, deterministic, explicit diff of two allow-only permission sets prior to an agent release, and you do not need IAM inheritance resolution, wildcard containment analysis, or live authorization enforcement. Ideal for pre-deployment security checklists and audit trails where a simple addition/removal/wildcard report is sufficient.

## Known failure modes

- Before or after arrays exceed 50 items — request rejected
- Invalid dataClass value (must be 'public' or 'synthetic') — validation error
- Malformed permission objects in before/after arrays — schema rejection
- Empty or missing required fields — 400 error
- Payment failure via x402 protocol — call not executed

## How this service works

Review permission changes before an agent release. Compare two explicit allow-only sets by tool, action and exact resource; report additions, removals and wildcard additions. Does not resolve IAM inheritance or wildcard containment, or authorize execution.

## Output

Returns a structured diff result object containing lists of added permissions, removed permissions, and wildcard additions, along with metadata including version, offerId, inputDigest, receiptDigest, amountBaseUnits, and a boundaries array. Does not resolve IAM inheritance, wildcard containment, or authorize execution.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "dataClass": {
       "type": "string",
       "enum": [
        "public",
        "synthetic"
       ]
      },
      "before": {
       "type": "array",
       "minItems": 0,
       "maxItems": 50
      },
      "after": {
       "type": "array",
       "minItems": 0,
       "maxItems": 50
      }
     },
     "required": [
      "dataClass",
      "before",
      "after"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "version": {
       "type": "string",
       "enum": [
        "maha-microproducts/0.1"
       ]
      },
      "offerId": {
       "type": "string",
       "enum": [
        "tool-permission-diff"
       ]
      },
      "amountBaseUnits": {
       "type": "string",
       "enum": [
        "21000"
       ]
      },
      "inputDigest": {
       "type": "string",
       "maxLength": 71
      },
      "result": {
       "type": "object"
      },
      "boundaries": {
       "type": "array",
       "minItems": 0,
       "maxItems": 128
      },
      "receiptDigest": {
       "type": "string",
       "maxLength": 71
      }
     },
     "required": [
      "version",
      "offerId",
      "amountBaseUnits",
      "inputDigest",
      "result",
      "boundaries",
      "receiptDigest"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tool-permission-diff-11c87416/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.mahastrategies.com](https://www.zero.xyz/host/www.mahastrategies.com/llms.txt)
