{"uid":"cap_Qy4JzXv2ywTPv6nWlhQ0p","slug":"coco-text-diff-2023485c","name":"CoCo Text Diff","description":"Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.","url":"https://cocoeatsai.com/area4/agent/tools/text-diff?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input","output"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"enum":["GET"]},"queryParams":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type","example"],"properties":{"type":{"const":"json"},"example":{"type":"object","required":["similarity"],"properties":{"similarity":{"type":"number"}}}}}}},"responseSchema":{"type":"json","example":{"identical":false,"similarity":0.6,"lines_added":1,"unified_diff":"--- a\n+++ b\n@@ -1 +1 @@\n-1.2.3\n+1.3.0","lines_removed":1},"exampleNote":"Computed offline with demonstration inputs; time/random values are illustrative."},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UHeQW_v4AHU2OIXSVmmdA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares two text strings and returns a similarity score, unified diff, and line-change counts","exampleAgentPrompt":"Can you diff these two version strings for me — string A is '1.2.3' and string B is '1.3.0' — and tell me the similarity score and what changed?","exampleUseCases":[{"title":"Version string comparison for release notes","prompt":"Compare these two version strings: A is '1.4.2' and B is '1.5.0' — give me the similarity score and a unified diff so I can see exactly what changed."},{"title":"Config file snippet drift detection","prompt":"I have two config snippets I need to diff: A is 'timeout=30\nretries=3' and B is 'timeout=60\nretries=3\ndebug=true' — how similar are they and what lines were added or removed?"},{"title":"Checking if two text blocks are identical","prompt":"Are these two paragraphs identical? A is 'Hello world, this is a test.' and B is 'Hello world, this is a test.' — run a diff and tell me the similarity score."}],"resultDescription":"Returns a JSON object with: a boolean 'identical' flag, a float 'similarity' score between 0 and 1, integer counts for 'lines_added' and 'lines_removed', and a 'unified_diff' string showing the standard unified diff format between the two inputs.","failureModes":["Missing required query params 'a' or 'b' — likely returns an error or empty result","Very large strings may cause performance degradation or timeouts","Non-UTF8 or binary input strings may produce unexpected diff output","Payment not completed (x402) results in 402 response before diff is computed"],"whenToPreferThis":"Choose this endpoint when you need a quick, cheap ($0.001) programmatic text diff with a similarity score returned as structured JSON — especially useful in agent workflows comparing version strings, config snippets, or short text blocks where a unified diff and numeric similarity are both needed in one call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T12:43:34.922Z","isFirstParty":false,"canonicalSlug":"coco-text-diff-2023485c"}