Skip to main content
Glama

search_public_queries

Find Dune Analytics queries by keyword to discover relevant table names and SQL examples for data analysis.

Instructions

Search public queries by keyword. Use this to discover table names from existing SQL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • This is the main handler function for the 'search_public_queries' tool. It is decorated with @mcp.tool(), which serves as both the implementation and registration in FastMCP. It searches public Dune queries using dune_service and formats the results.
    @mcp.tool() def search_public_queries(query: str) -> str: """ Search public queries by keyword. Use this to discover table names from existing SQL. """ results = dune_service.search_queries(query) # Handle WAF/Error if isinstance(results, dict) and "error" in results: return f"Error: {results['error']}" if not results: return f"No public queries found matching '{query}'." # Format as string summary summary = [] for q in results[:10]: # Limit to 10 summary.append(f"ID: {q.get('id')} | Name: {q.get('name')} | Owner: {q.get('owner')}") return "\n".join(summary)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nice-bills/dune-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server