Skip to main content
Glama

dune_query_unarchive

Restore archived Dune Analytics queries to make them accessible for blockchain data analysis and query management workflows.

Instructions

Unarchive a saved Dune query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
query_idYes

Implementation Reference

  • Registration of the dune_query_unarchive tool using FastMCP @app.tool decorator.
    @app.tool( name="dune_query_unarchive", title="Unarchive Saved Query", description="Unarchive a saved Dune query.", tags={"dune", "admin"}, )
  • Handler function that executes the unarchive operation via QUERY_ADMIN_SERVICE, logs success/error to query history, and returns the result or error response.
    def dune_query_unarchive(query_id: int) -> dict[str, Any]: _ensure_initialized() assert QUERY_ADMIN_SERVICE is not None try: result = dict(QUERY_ADMIN_SERVICE.unarchive(query_id)) # Log admin action if QUERY_HISTORY is not None: QUERY_HISTORY.record( execution_id=f"unarchive_{query_id}", query_type="query_id", query_preview=f"Unarchived query {query_id}", status="success", duration_ms=0, action_type="admin_action", query_id=query_id, action="unarchive", ) return result except Exception as e: # Log error if QUERY_HISTORY is not None: QUERY_HISTORY.record( execution_id=f"unarchive_{query_id}", query_type="query_id", query_preview=f"Failed to unarchive query {query_id}", status="error", duration_ms=0, action_type="admin_action", query_id=query_id, action="unarchive", error=str(e), ) return error_response(e, context={"tool": "dune_query_unarchive", "query_id": query_id})

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/Evan-Kim2028/spice-mcp'

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