archive_query
Archive or delete a Dune Analytics query to manage your workspace and remove unnecessary data. Requires a paid plan for access.
Instructions
Archive/Delete a query. (Requires Paid Plan)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query_id | Yes |
Implementation Reference
- src/main.py:176-185 (handler)MCP tool handler for 'archive_query' that invokes the Dune service and handles errors with user-friendly messages.@mcp.tool() def archive_query(query_id: int) -> str: """ Archive/Delete a query. (Requires Paid Plan) """ try: dune_service.archive_query(query_id) return f"Successfully archived Query {query_id}." except Exception as e: return f"Error archiving query: {str(e)}"
- src/services/dune_client.py:422-430 (helper)Supporting method in DuneService that calls the underlying Dune client to archive the query.def archive_query(self, query_id: int) -> bool: """ Archives a query. Returns True on success. """ try: return self.client.archive_query(query_id) except Exception as e: logger.error(f"Error archiving query {query_id}: {e}") raise