{"uid":"cap_TfbScl69dibM7eaB8V9ef","slug":"agent402-tools-onchain-sql-schema-abd0b7de","name":"agent402.tools Onchain SQL Schema","description":"The table + column schema for the onchain-sql tool - every queryable table (base.events, base.transactions, base.blocks, base.decoded_user_operations, base.transaction_attributions, solana.instructions, …) with its columns and types. Fetch once, then write SQL with confidence.","url":"https://agent402.tools/api/onchain-sql-schema","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"required":{"type":"string"},"properties":{"type":"string"}}},"responseSchema":{"type":"json","example":{"schema":{"base.events":[{"name":"block_number","type":"UInt64"}]}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_r49beXUJ4LSCgU0lrt01R","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the full table and column schema for the onchain-sql query tool, listing every queryable blockchain table with its columns and types","exampleAgentPrompt":"Before I write an onchain SQL query, can you fetch the full schema for the onchain-sql tool so I know what tables like base.events, base.transactions, and solana.instructions look like — including all their columns and types?","exampleUseCases":null,"resultDescription":"A structured schema document listing every queryable blockchain table (e.g. base.events, base.transactions, base.blocks, base.decoded_user_operations, base.transaction_attributions, solana.instructions) with each column name and its data type, enabling accurate SQL query construction.","failureModes":["Network or service unavailability returns a non-200 HTTP status","Payment failure (402) if the $0.002 USDC x402 payment is not processed","Schema may be stale if blockchain indexer adds new tables not yet reflected"],"whenToPreferThis":"Use this endpoint as a prerequisite before writing any onchain SQL query — it tells you exactly what tables and columns exist so you can write valid SQL. Prefer this over guessing schema or relying on documentation that may be outdated.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:02:41.624Z","isFirstParty":false}