dune-mcp
The Dune MCP server enables secure, token-efficient interaction with Dune Analytics through LLMs, prioritizing query reuse over raw SQL generation with built-in budget protection.
Query Discovery & Inspection:
Search public queries by keyword to discover existing solutions and table names
List queries by user handle to browse specific accounts
Get detailed SQL and parameters for any query by ID
Search the official Dune Spellbook GitHub repository for zero-credit table discovery
View Spellbook file content to inspect SQL models and schema definitions
Query Execution & Results:
Execute queries by ID with optional parameters and get a tracking job ID
Poll job status with automatic 30-second intervals
Get lightweight result previews (first 5 rows + statistics) to avoid token overflow
Export full results to CSV as an escape hatch for large datasets
Query Management (Requires Paid Plan):
Create new queries and save to your Dune account
Update existing queries with new SQL or descriptions
Archive or delete queries
Analysis & Error Handling:
Analyze results to detect outliers (Z-score > 3) and trends automatically
Get AI-driven fix suggestions for failed queries based on error messages and SQL
Budget & Account Monitoring:
Check account status for remaining credits and budget limits
Monitor session budget to track usage in the current session
Built-in guards prevent credit exhaustion
Schema Exploration:
Get table schema for specific tables (note: consumes Dune credits via zero-row query)
Use Spellbook search for zero-credit schema discovery as preferred alternative
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dune-mcpsearch for recent queries about Uniswap trading volume"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Dune MCP (Model Context Protocol)
A defensive, token-aware MCP server for Dune Analytics.
This project enables LLMs (like Claude, or custom agents) to securely interact with Dune Analytics. It acts as a "Smart Gateway" that prioritizes Query Reuse and Budget Safety over raw SQL generation, protecting your API credits and reducing token consumption.
Quick Start
Option 1: Install via PyPI (Recommended)
Install:
# The easiest way to manage tools uv tool install dune-mcp # OR using pip pip install dune-mcpTo Update:
uv tool upgrade dune-mcp # OR pip install --upgrade dune-mcpConfigure Claude Desktop: Add this to your
claude_desktop_config.json:{ "mcpServers": { "dune": { "command": "dune-mcp", "env": { "DUNE_API_KEY": "your_api_key", "DUNE_USER_HANDLE": "your_username", "GITHUB_TOKEN": "optional_github_token" } } } }
Option 2: Run from Source
Clone & Setup:
git clone https://github.com/nice-bills/dune-mcp.git cd dune-mcp uv sync cp .env.example .env # Edit .env with your keysConfigure Claude Desktop:
{ "mcpServers": { "dune": { "command": "uv", "args": ["run", "src/main.py"], "cwd": "/absolute/path/to/dune-mcp" } } }
Related MCP server: Spice MCP
Usage
Once connected, you can ask Claude things like:
"Find queries about Uniswap volume on Base."
"List my recent queries."
"Execute query ID 12345."
"Analyze the results of the last query."
Zero-Credit Schema Discovery
Google-like Search: Reverse-engineered GraphQL integration allows searching public queries by keyword (e.g., "uniswap volume").
Portfolio Browsing: List queries by user handle to access your own or others' work.
Budget Manager: Deterministic guards that prevent credit exhaustion.
Token-Optimized: Returns "Indices" (summaries) instead of raw schemas. Results are previewed (top 5 rows), not streamed in full.
Query Reuse First: Tools encourage searching existing community queries before generating new SQL.
CSV Export: "Escape hatch" to download full datasets to disk instead of flooding the LLM context.
Toolset
search_public_queries(query): Search existing queries by keyword (free & fast).list_user_queries(handle, limit): List queries by user (e.g., "bils").search_spellbook(keyword): Search the official Dune Spellbook GitHub repo for tables (e.g., "uniswap").get_spellbook_file_content(path): View the SQL or schema of a Spellbook file.get_query_details(query_id): Inspect SQL and parameters (on demand).get_table_schema(table_name): Get columns for a specific table (Costs Credits).execute_query(query_id): Run a query (async, budget-checked).get_job_status(job_id): Poll for completion.get_job_results_summary(job_id): Get a lightweight preview (5 rows + stats).export_results_to_csv(job_id): Download the full dataset.analyze_results(job_id): Detect outliers and trends in data.analyze_query_error(error_message, query_sql): Get AI-driven fix suggestions for failed queries.create_query(name, sql): Save a new query to your Dune account.update_query(query_id, sql): Modify an existing query.archive_query(query_id): Delete/Archive a query.
Installation
This project uses uv for fast package management.
# 1. Clone the repo
git clone https://github.com/nice-bills/dune-mcp.git
cd dune-mcp
# 2. Setup config
cp .env.example .env
# Edit .env and add your DUNE_API_KEYConfiguration
Add your handle to .env to allow the MCP to auto-detect your queries. You can also provide multiple API keys for load rotation:
DUNE_API_KEY=your_key
# OR
DUNE_API_KEYS=key1,key2,key3 # Comma-separated list for rotation
DUNE_USER_HANDLE=your_username # OptionalUsage
Option 1: Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"dune": {
"command": "uv",
"args": ["run", "-m", "src.main", "--directory", "/path/to/dune-mcp"]
}
}
}Option 2: MCP Inspector (Web UI)
Test the tools interactively in your browser.
npx @modelcontextprotocol/inspector uv run -m src.mainBest Practices
Zero-Credit Schema Discovery
To find table names or column structures without consuming Dune credits:
Use
search_spellbook("keyword")to find official Dune Spellbook models (SQL files) and schema definitions (schema.yml) that match your topic.Use
get_spellbook_file_content("path/to/file.sql")to view the SQL or schema definition. This directly gives you the table name and its structure.Alternatively, use
search_public_queries("topic")to find existing queries on the topic.Use
get_query_details(id)to inspect their SQL.Extract the table names (e.g.,
uniswap_v3_ethereum.Factory_evt_PoolCreated) from the SQL.
This "Rosetta Stone" approach is faster, safer, and cheaper than blindly querying the schema.
Safety Principles
Never stream raw data: 100k rows = Token Death. We stream previews + stats.
Two-Phase Reasoning: Plan (Search/Estimate) → Execute.
MCP Does the Boring Work: We calculate min/max/avg in Python, not the LLM.
Limitations
Paid Features: The
create_query,update_query, andarchive_querytools require a Paid Dune Plan (Plus or Premium) to access the write-access API endpoints. Free tier users will receive a 403 Forbidden error.Rate Limits: Be mindful of Dune's API rate limits, especially on the free tier.
WAF: The search tools use an unofficial method and may be temporarily blocked by Cloudflare. The MCP handles this by suggesting alternatives.
License
MIT
Available Tools
17 toolsanalyze_query_errorC
Analyze failed queries and suggest fixes (e.g. for 'Column not found').
| Name | Required | Description | Default |
|---|---|---|---|
| error_message | Yes | ||
| query_sql | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description should carry the full burden. It states the tool analyzes errors, but does not disclose whether it modifies anything, requires authentication, or has side effects. The behavioral scope is vague.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely short and front-loaded with the core action, but it sacrifices useful detail. A single sentence suffices for purpose but leaves out guidelines and parameter semantics.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description is too minimal for the complexity of error analysis. The agent lacks information about the nature of suggested fixes, reliability, or limitations. More context is needed for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, meaning no parameter descriptions exist in the schema. The description adds no explanation for 'error_message' or 'query_sql' beyond their names. The agent gets no insight into format, boundaries, or expected values.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly specifies the tool's purpose: analyzing failed queries and suggesting fixes, with an illustrative example ('Column not found'). This is a specific verb+resource combination that distinctly differentiates from siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives such as 'analyze_results', 'get_query_details', or 'execute_query'. The description does not mention prerequisites or conditions for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
analyze_resultsC
Detect outliers (Z-score > 3) and trends in query results.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and description does not disclose whether this tool is read-only, destructive, or requires special permissions. The existence of an output schema is not leveraged to clarify return structure or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is a single sentence with no extraneous words, making it concise. However, it lacks structure (e.g., separate sections for purpose, usage, parameters) that could improve scannability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description does not mention return values or pagination. Important context about when and how to use the tool is missing, especially given the absence of annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The sole parameter job_id has no description in the input schema, and the tool description does not explain its meaning or how to obtain it. Schema coverage is 0%, so the description fails to add semantic value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool detects outliers (Z-score > 3) and trends in query results, with a specific verb and resource. It distinguishes from siblings like execute_query or get_job_results_summary by focusing on analysis rather than execution or retrieval.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. Does not mention prerequisites like a prior query execution, nor does it suggest scenarios where sibling tools (e.g., get_job_results_summary) might be more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
archive_queryC
Archive/Delete a query. (Requires Paid Plan)
| Name | Required | Description | Default |
|---|---|---|---|
| query_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It hints at mutation ('Archive/Delete') and mentions a paid plan requirement, but lacks details on side effects, reversibility, permissions, or effects on related data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Very brief (single sentence) and front-loaded with key action, but omits important details. The parenthetical about paid plan could be integrated better.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive tool with 0% schema coverage and no annotations, the description is insufficient. It does not explain return values, operation idempotency, or what happens to associated data, despite an output schema being present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has 0% description coverage, and the description does not explain the 'query_id' parameter. No constraints, format, or context is provided, leaving the agent to infer meaning solely from the parameter name.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool archives/deletes a query, with verb 'Archive/Delete' and resource 'query'. It distinguishes from siblings like create_query and execute_query, but could clarify the difference between archiving and deletion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Only provides a prerequisite ('Requires Paid Plan') but no guidance on when to use this tool versus alternatives, such as update_query or creating a new query. No exclusions or context for when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_queryA
Save a new query to Dune. Returns Query ID. (Requires Paid Plan)
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| sql | Yes | ||
| description | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only mentions saving and returning an ID, but does not specify side effects (e.g., overwriting, validation), error states, or rate limits. 'Requires Paid Plan' is helpful but insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences, front-loading the purpose and return value. Every sentence earns its place with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has low complexity (3 simple params, output schema exists). The description covers the core action and a prerequisite, but lacks details on parameter constraints or typical usage patterns. It is minimally adequate but not fully informative.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description adds no meaning beyond parameter names. 'name', 'sql', and 'description' are self-explanatory, but the description does not clarify constraints (e.g., uniqueness of name) or format requirements.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Save a new query to Dune'), the return value ('Returns Query ID'), and a prerequisite ('Requires Paid Plan'). It distinguishes from siblings like 'update_query' and 'execute_query' by focusing on creation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions a prerequisite (Paid Plan) but lacks explicit guidance on when to use this tool versus alternatives like 'update_query' or 'execute_query'. The context is clear enough for an agent familiar with CRUD operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_queryC
Execute a query by ID. Returns Job ID.
| Name | Required | Description | Default |
|---|---|---|---|
| query_id | Yes | ||
| params | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It only states 'execute' and 'returns Job ID', omitting crucial behavioral details like synchronicity, error handling, idempotency, or required permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no wasted words. However, it lacks structure (e.g., separate sentences for params) and could benefit from slight expansion without losing brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description does not explain how to use the tool in context. It misses parameter semantics and usage context relative to siblings, which is inadequate for a tool with two parameters and no annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but description only hints at query_id ('by ID') and completely ignores the 'params' parameter, which is flexible (anyOf object/null). This leaves agents uncertain about how to use it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the action ('Execute a query by ID') and the return value ('Returns Job ID'). This distinguishes it from sibling tools like analyze_query_error or archive_query, which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. Agents are not told about prerequisites (e.g., query must exist) or when to choose this over get_job_status or analyze_query_error.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
export_results_to_csvC
Download full query results to local CSV.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only mentions 'download' but fails to describe file size limits, timeouts, authentication requirements, error handling, or how the download is initiated (e.g., URL vs. stream).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at 6 words, but it sacrifices informativeness. It could benefit from a brief note on usage, yet it remains front-loaded and to the point.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite low complexity (1 parameter, output schema exists), the description omits critical context: whether the download is synchronous, what happens if the job is not ready, and how to handle the output. It is not complete enough for an agent to use safely.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description should explain the job_id parameter. It does not mention how job_id is obtained or any constraints, forcing the agent to rely solely on the parameter name.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('download') and the resource ('full query results to local CSV'). It distinguishes the tool from siblings that analyze, summarize, or manage queries, making its purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like get_job_results_summary or analyze_results. It does not specify prerequisites (e.g., job must be completed) or mention any limitations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_account_statusA
Check remaining credits and budget limits.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It lacks disclosure of behavioral traits such as data freshness, cost implications, or permission requirements. Merely states the function without context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise with 5 words, front-loaded, and every word adds value. No unnecessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description does not elaborate on what information is returned. Given the tool's simplicity and existence of sibling get_session_budget, more context about scope (account vs session) would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has zero parameters and schema coverage is 100%. Per guidelines, baseline is 4. Description adds no extra information, but none is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the action: checking remaining credits and budget limits. It uses specific verb+resource, making the tool's purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like get_session_budget. Description does not mention context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_job_results_summaryB
Get result preview (5 rows) and stats.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It states it returns a preview and stats, but does not disclose if it's read-only, permission requirements, or what 'stats' includes. Minimal behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short (one sentence) and to the point. However, it could be slightly more structured (e.g., separate line for stats). No waste, but borderline too terse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple schema (1 param) and presence of an output schema, the description could be minimal, but it fails to mention what 'stats' includes, error cases, or any non-obvious behavior. Leaves gaps for a tool that returns results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description adds no information about the job_id parameter beyond the schema's type and title. No format or constraints are mentioned.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description specifies the verb 'Get', the resource 'result preview (5 rows) and stats', and distinguishes from siblings like get_job_status (status) and get_query_details (details). The concrete detail '5 rows' adds precision.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool vs. alternatives like export_results_to_csv or analyze_results. The description implies usage for a quick preview, but lacks exclusions or context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_job_statusC
Check query execution status. Polls for 30s.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. Discloses polling behavior with 30s timeout, but lacks detail on return states, side effects, or behavior after timeout.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with verb and resource, and no wasted words. However, could be slightly longer to add necessary detail without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 1 parameter and output schema present, the description covers purpose and polling behavior. But it omits what happens after 30s, error conditions, and when to retry, leaving gaps for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and description adds no meaning to the 'job_id' parameter beyond what the schema provides (name and type).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description uses specific verb 'check' and resource 'query execution status', clearly distinguishing it from siblings like 'get_query_details' and 'get_job_results_summary'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or alternatives guidance. The phrase 'Polls for 30s' implies a polling use case but does not contrast with sibling tools or specify when to stop polling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_query_detailsB
Get SQL and parameters for a query ID.
| Name | Required | Description | Default |
|---|---|---|---|
| query_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description must disclose behavioral traits. It only says 'Get', implying read-only, but does not explicitly state side-effect freedom, authentication needs, or rate limits. The minimal description fails to compensate for lack of annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no redundant words. However, it could include slightly more detail (e.g., what the output contains) without becoming verbose, so it's not maximally effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter, the description is minimally adequate. It states the core function but does not mention the output schema (which exists) or any edge cases. Given low schema coverage and no annotations, it could be more complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must add meaning beyond parameter names. It mentions 'query ID' but provides no additional context like format, source, or constraints beyond what the schema already indicates (integer, required).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it retrieves SQL and parameters for a query ID, which is a specific resource. It distinguishes from sibling tools like 'analyze_query_error' or 'list_user_queries' which do not return SQL/parameters.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, context, or exclusions, leaving the agent without direction for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_session_budgetB
Check remaining queries/credits for this session.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of disclosing behavior. It only states 'check' but does not clarify whether the operation is read-only, what happens if the session is invalid, or any authentication requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence that communicates the core action. It is concise, though it could be slightly more structured by including a note on safety or alternative tools.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no parameters and an output schema exists, the description is adequate but minimal. It does not specify the return format, error conditions, or confirm that the operation is non-destructive, which would be helpful for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so there are none to describe. Schema coverage is 100%, and the description adds no parameter information, which is appropriate. The baseline score for 0 parameters is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool checks remaining queries/credits for the session, which is a specific verb and resource. However, it does not differentiate from sibling tool 'get_account_status' which might also provide quota information, leaving potential ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'get_account_status', nor are there any prerequisites or exclusions mentioned. The description is purely functional.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_spellbook_file_contentC
Fetch raw content of a Spellbook file from GitHub.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description lacks details about behavioral traits (e.g., read-only nature, authentication needs, rate limits, or file size constraints). The description carries the full burden but only states basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no wasted words. It efficiently communicates the core function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description lacks context about what a Spellbook file is, how the path should be structured, and potential edge cases. The tool is simple but still incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description adds no meaning to the 'path' parameter (e.g., format, examples, or required structure). The tool fails to compensate for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches raw content of a Spellbook file from GitHub, using a specific verb ('Fetch') and resource ('Spellbook file'), distinguishing it from siblings like search_spellbook.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like search_spellbook or other file-related tools. No context on prerequisites or typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_schemaA
Get columns for a table. Costs Credits (runs SELECT * LIMIT 0).
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description discloses that the tool costs credits and runs SELECT * LIMIT 0, which is important behavioral context for an AI agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, front-loaded, and contains no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and an output schema, the description covers key behavioral and cost aspects, though it could mention the return format briefly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% parameter description coverage, and the description adds no additional meaning beyond the parameter name 'table_name'.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool obtains columns for a table, distinguishing it from siblings that focus on query execution or analysis.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions cost and execution behavior but does not explicitly guide when to use this tool versus alternatives like analyze_query_error or get_query_details.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_user_queriesC
List queries by user handle.
| Name | Required | Description | Default |
|---|---|---|---|
| handle | No | ||
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It only says 'List queries' without disclosing that handle is optional, default limit, or auth requirements. Lacks behavioral details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short (one sentence) but lacks necessary details. It is concise in length but under-specified, so it earns a middle score.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description omits key context: optional parameters, default behavior, and differentiation from siblings. Incomplete for a 2-param tool with no annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but description only mentions 'by user handle', ignoring the 'limit' parameter and the optional/null nature of handle. Fails to add meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists queries filtered by user handle, which is specific and actionable, though it does not distinguish from sibling tools like search_public_queries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives, no prerequisites or exclusions mentioned. The description lacks context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_public_queriesB
Search public queries by keyword. Use this to discover table names from existing SQL.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description implies a read-only search but does not disclose any behavioral traits like auth requirements, rate limits, or side effects. The burden is entirely on the description, which is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise: two sentences, no filler. Every word serves a purpose, front-loading the action and use case.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the single parameter and existence of an output schema, the description provides minimal but adequate context for a simple search tool. However, it does not explain the concept of 'public queries' or the structure of results beyond what the output schema might cover.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, meaning the description does not explain the 'query' parameter beyond the schema. It says 'by keyword' but adds no details on format, length, or constraints, failing to compensate for the lack of schema documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it searches public queries by keyword and hints at discovering table names from SQL. Distinguishes from siblings like list_user_queries and search_spellbook, though could be more explicit about what 'public queries' are.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides a specific use case ('discover table names') but lacks explicit when-not-to-use instructions or comparisons to alternatives. The phrase 'Use this to' offers some guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_spellbookA
Search GitHub Spellbook for official tables (.sql/.yml). Zero-credit schema discovery.
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must fully disclose behavioral traits. It states the tool provides 'Zero-credit schema discovery' (indicating no cost), but does not confirm read-only nature, side effects, or what happens on failure. The zero-credit hint is valuable but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at 14 words across two sentences. Every word is informative, front-loading the core purpose and a distinguishing feature (zero-credit). No unnecessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (one parameter, output schema exists), the description covers the essential function and a key behavioral trait (zero-credit). It does not explain return values or pagination, but the output schema likely provides that. Overall sufficiently complete for its scope.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It implies the 'keyword' parameter is a search term for table names, but does not provide examples, format, or allowed patterns. For a single required string parameter, the added context is adequate but not detailed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches 'GitHub Spellbook for official tables (.sql/.yml)', using the specific verb 'search' and identifying the resource (official tables) and data format. This distinguishes it from siblings like get_spellbook_file_content and get_table_schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for schema discovery without credit cost ('Zero-credit schema discovery'), but does not explicitly state when to use this tool vs alternatives (e.g., when you know the exact table name, use get_table_schema instead). No when-not-to-use guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_queryC
Update SQL/description of an existing query. (Requires Paid Plan)
| Name | Required | Description | Default |
|---|---|---|---|
| query_id | Yes | ||
| sql | Yes | ||
| description | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must fully disclose behavior. It implies mutation but does not detail overwrite behavior, required permissions, rate limits, or error conditions. The paid plan note adds some transparency but leaves significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise (one sentence) with no wasted words, but it lacks structure such as bullet points or sections. It is front-loaded with the action and requirement, but the brevity sacrifices informative content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema (reducing need to describe returns), the description is incomplete. It omits prerequisites beyond paid plan, no error handling, no use examples, and no behavioral details about the update process. Given the tool's 3 parameters, this is insufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description only vaguely maps to the 'sql' and 'description' parameters without explaining formats, allowed values, or the mandatory 'query_id' parameter. The description adds minimal semantic value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Update' and the resource 'existing query'. It specifies the updatable fields (SQL/description) and adds a user requirement (Paid Plan). This differentiates it from siblings like create_query or archive_query.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like create_query or list_user_queries. The only additional context is the paid plan requirement, which does not help in selecting the correct tool for a given task.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
17 tool updates
- First observed
analyze_query_error - First observed
analyze_results - First observed
archive_query - First observed
create_query - First observed
execute_query - First observed
export_results_to_csv - First observed
get_account_status - First observed
get_job_results_summary - First observed
get_job_status - First observed
get_query_details - First observed
get_session_budget - First observed
get_spellbook_file_content - First observed
get_table_schema - First observed
list_user_queries - First observed
search_public_queries - First observed
search_spellbook - First observed
update_query
TDQS
Scored across 17 tools
Most tools target distinct resources and actions, and the naming/descriptions make the query lifecycle clear. The main ambiguity is between the two credit/budget tools and to a lesser degree between search_public_queries and search_spellbook, but descriptions mostly help resolve it.
All tool names follow a consistent verb_noun snake_case pattern (get_, create_, update_, search_, execute_, export_). The verbs and objects are predictable across query, job, and schema domains, making the tool set very easy to navigate.
17 tools is on the higher side for an MCP server, but it is justified by covering query management, execution, results, schema discovery, billing, and analysis. It feels slightly heavy, but each tool addresses a distinct part of the Dune workflow and no obvious filler tools exist.
The server covers the full query lifecycle: create/update/archive, execute, poll status, and obtain results, plus schema discovery and budget management. Minor gaps exist, such as no explicit job cancellation and no tool to fetch full results as structured data in-context, but the core workflows are workable.
Maintenance
Related MCP Connectors
Deterministic safety, correctness & cost gate that vets Postgres SQL before your AI agent runs it.
Query BigQuery, Snowflake, Redshift & Azure Synapse with natural language
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAllows LLM agents and MCP clients to analyze blockchain data including wallet balances, token information, and transaction history across EVM and Solana chains through the Dune API.10 npm4MIT
- AlicenseBqualityCmaintenanceEnables querying and analyzing blockchain data from Dune Analytics with Polars-optimized workflows, including schema discovery, Sui package exploration, and query management through natural language.101MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query and analyze blockchain data from Dune Analytics, supporting execution of saved queries, ad-hoc DuneSQL queries, and access to cached results with parameter support.MIT
- AlicenseAqualityDmaintenanceDune MCP Server connects your AI assistant to Dune Analytics, the leading platform for blockchain data. Execute SQL queries across Ethereum, Solana, and 20+ chains to analyze DEX trades, token transfers, NFT sales, and wallet activity. Manage saved queries, upload custom datasets, and access curate19MIT