{"uid":"cap_oyqrmy14Hro8hI10v16cQ","slug":"moneytools-mime-type-sniffer-0a844215","name":"MoneyTools: MIME Type Sniffer","description":"Catalog of MoneyTools: 116 cheap, read-only tools for AI agents. Free daily tier, then x402 USDC micropayments or prepaid credits. Token safety, approvals, tx decoding, EIP-712 risk, gas, ENS, x402 validation, DNS, RDAP, JSON Schema, time, FX.","url":"https://tools.moneytools.dev/v1/mime-sniff?utm_source=zero.xyz","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":{"const":"http"},"method":{"const":"GET"},"queryParams":{"type":"object","required":[],"properties":{"text":{"type":"string","examples":["<?xml version=\"1.0\"?><root/>"],"description":"optional text body to peek"},"filename":{"type":"string","examples":["report.pdf"],"description":"optional filename with extension"},"bytesBase64":{"type":"string","examples":[""],"description":"optional base64 of the first bytes (≤64 KB decoded)"}}}}},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","properties":{"payment":{"type":"object","properties":{"charged":{"type":"boolean"},"network":{"type":"string"},"amountUsd":{"type":"string"},"transaction":{"type":["string","null"]}}},"freeTier":{"type":"object"},"_moneytools":{"type":"object","description":"optional plan / partner hints"}},"description":"Tool-specific JSON result (see llms.txt / openapi.json). Always includes payment info.","additionalProperties":true}}}}},"responseSchema":{"type":"json","example":{"note":"Heuristic only (extension + magic bytes + text peek). No file is stored.","filename":"report.pdf","fromText":"application/xml","fromMagic":null,"confidence":"medium","contentType":"application/xml","fromExtension":"application/pdf","bytesInspected":28}},"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_Iu8sPoZpqUKozplut3eYe","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":"Detect the MIME type of a file or content by inspecting its filename extension, raw bytes, or text content","exampleAgentPrompt":"What MIME type is this file — the filename is 'report.pdf' and I can give you the first few bytes in base64 if needed?","exampleUseCases":[{"title":"Identify uploaded file type before processing","prompt":"I have a file called 'export.csv' and I need to know its MIME type before I process it — can you sniff the content type from the filename?"},{"title":"Detect binary content type from raw bytes","prompt":"Here are the first bytes of a file in base64: 'JVBERi0xLjQ=' — what MIME type does that correspond to?"},{"title":"Validate XML content type from text snippet","prompt":"I have this text snippet: '<?xml version=\"1.0\"?><root/>' — what MIME type should I use when serving this content?"}],"resultDescription":"A JSON object containing the detected MIME type (e.g. 'application/pdf', 'text/csv') inferred from the provided filename extension, base64-encoded bytes, or text snippet. Also includes payment metadata (charged flag, network, amount in USD, transaction hash) and optional MoneyTools plan hints.","failureModes":["Ambiguous or missing inputs (no filename, bytes, or text provided) may result in a generic 'application/octet-stream' fallback","Invalid base64 encoding in bytesBase64 will cause a parse error","Extremely rare or proprietary file formats may not be recognized","File bytes truncated below magic-byte threshold may yield incorrect results","Rate limit exceeded on free tier returns 402 Payment Required until x402 payment is provided"],"whenToPreferThis":"Use this endpoint when you need lightweight, serverless MIME type detection without running a local magic-byte library. Ideal for AI agents that receive files as base64 blobs, filenames, or text snippets and need to determine content type before routing, validating, or serving them. Preferred over OS-level tools when operating in sandboxed or cloud environments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T18:40:46.717Z","isFirstParty":false,"canonicalSlug":"moneytools-mime-type-sniffer-0a844215"}