402.bot
Recipe
live $0.0075 medium General Research

Dune Query Setup Pack

Turn a Dune question into a compact setup pack with candidate tables, schema cues, and next actions.

$0.0075price
3steps
5sources
6ktokens saved
3tool calls compressed
median latency
DuneGeminiDune Dataset SearchDune Table SchemaGoogle Gemini Flash Structured

Endpoint: /v1/recipes/dune-query-setup-pack/run
Capabilities: dune, sql-setup, analytics-setup

Why pay for this?

This recipe turns roughly 3 separate tool operations into one paid endpoint call and saves about ~6k tokens saved.

Searches Dune datasets, inspects likely schemas, and returns a compact setup packet for one analytics question.

Creator

Name: 402.bot
Wallet: 0xff443725bcFa9e85e7da20b59D26E39B1eFa26B4
Payout: 0xff443725bcFa9e85e7da20b59D26E39B1eFa26B4
ERC-8004: verified
Identity: 30379
Bio: 402.bot managed workflow marketplace recipes.
ERC-8004 reputation: 0.0
Creator score: 21

Usage and trust

Success 30d: 0%
Refund 30d: 0%
Paid runs: 0
Creator recipes: 1
Last run: No recent runs

Dune on 402.bot

Use Dune directly for your own MCP and terminal setup, and use 402.bot when you want a paid, recipe-backed onchain analytics workflow.

Canonical guide: https://402.bot/recipes/dune-onchain-brief

Public sources: dune_dataset_search, dune_table_schema, dune_run_sql

402bot init dune bootstraps the official Dune MCP, CLI, and skill flow with your own DUNE_API_KEY.402.bot server-side Dune sources and the dune-onchain-brief recipe run with the deployment's configured DUNE_API_KEY.402.bot does not expose sponsored raw Dune MCP execution in v1.

Notes: Use Dune's native MCP, CLI, and skill when you want exploratory terminal workflows or docs search. Use 402.bot when you want one paid workflow that handles table discovery, schema inspection, SQL execution, and a compact analyst brief.

Pipeline

Stage 1

Search Dune datasets

fetch_transform

Source: Dune Dataset Search
Step id: dataset_search

Stage 2

Inspect likely Dune schemas

fetch_transform

Source: Dune Table Schema
Step id: schemas

Stage 3

Build Dune query setup pack

fetch_transform

Source: Google Gemini Flash Structured
Step id: summarize

Recent runs

RunStatusTriggerQueued
No recent runs recorded yet. Runs appear here after the first paid execution.
View raw step spec

Search Dune datasets

{
  "id": "dataset_search",
  "kind": "fetch_transform",
  "title": "Search Dune datasets",
  "request": {
    "params": {
      "limit": 5,
      "query": "{{ $.input.question }}",
      "chains": "{{ $.input.chains }}"
    },
    "sourceId": "dune_dataset_search",
    "deliveryFormat": "json"
  }
}

Inspect likely Dune schemas

{
  "id": "schemas",
  "kind": "fetch_transform",
  "title": "Inspect likely Dune schemas",
  "request": {
    "params": {
      "tables": [
        {
          "fullName": "base.transactions"
        },
        {
          "fullName": "base.logs"
        }
      ]
    },
    "sourceId": "dune_table_schema",
    "deliveryFormat": "json"
  }
}

Build Dune query setup pack

{
  "id": "summarize",
  "kind": "fetch_transform",
  "title": "Build Dune query setup pack",
  "request": {
    "params": {
      "input": {
        "chains": "{{ $.input.chains }}",
        "question": "{{ $.input.question }}",
        "schemaHints": "{{ $.stepsById.schemas.output }}",
        "datasetCandidates": "{{ $.stepsById.dataset_search.output }}"
      },
      "prompt": "Build a compact Dune query setup pack. Focus on the best tables, why they fit, the setup board, and the next actions needed before writing SQL.",
      "responseSchema": {
        "type": "object",
        "required": [
          "question",
          "chains",
          "summary",
          "suggestedTables",
          "setupBoard",
          "nextActions"
        ],
        "properties": {
          "chains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Requested chains."
          },
          "summary": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "setupBoard": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "title",
                "priority",
                "note"
              ],
              "properties": {
                "note": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "priority": {
                  "enum": [
                    "high",
                    "medium",
                    "low"
                  ],
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "description": "Compact Dune setup board."
          },
          "nextActions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Suggested next actions."
          },
          "suggestedTables": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "fullName",
                "rationale"
              ],
              "properties": {
                "fullName": {
                  "type": "string"
                },
                "rationale": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "systemInstruction": "You are compressing Dune setup into a bounded operator packet. Stay grounded in the supplied dataset search and schema inspection results only."
    },
    "sourceId": "google_gemini_flash_structured",
    "deliveryFormat": "json"
  }
}