Skip to main content
Glama
MinaProtocol

Mina MCP Server

Official
by MinaProtocol

query_archive_sql

Execute read-only SQL queries against Mina's archive database to fetch blockchain data such as blocks, commands, and accounts. Only SELECT, WITH, and EXPLAIN statements are permitted.

Instructions

[infra][tutorial+snapshot] Execute a read-only SQL query against the archive database. Only SELECT/WITH/EXPLAIN statements are allowed. Query timeout is 10 seconds. Not available in live mode (no archive DB). Common tables: blocks, user_commands, internal_commands, public_keys, accounts_accessed. Call get_archive_schema first if you don't know the table layout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesRead-only SQL (SELECT / WITH / EXPLAIN only). Example: SELECT state_hash, height FROM blocks WHERE chain_status = 'canonical' ORDER BY height DESC LIMIT 10
paramsNoParameterized values: $1, $2, ... in the SQL
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure, and it excels. It explicitly states the tool is read-only, limits SQL statement types, discloses a timeout, and notes unavailability in live mode. This goes well beyond basic mutability/safety hints and provides actionable operational constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded, with the core purpose stated in the first sentence. Every subsequent sentence adds useful information (constraints, timeout, availability, common tables, guidance) without redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is highly complete for a query tool, covering purpose, constraints, availability, timeout, and schema guidance. It lacks an explicit statement of the return format (e.g., result rows), which is left unspecified, but given no output schema exists and the tool name implies query results, this is a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides full coverage for both parameters (sql and params) with descriptions and an example. The description adds value by reinforcing the read-only constraint on the sql parameter and providing context about common tables, which helps formulate valid queries. Since coverage is 100%, the baseline is 3, and the added constraints and examples justify a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Execute a read-only SQL query against the archive database.' It specifies the resource (archive database) and the action (execute SQL), and distinguishes it from siblings like get_archive_schema (schema retrieval) and get_sync_status (sync status).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance, including the allowable SQL statement types (SELECT/WITH/EXPLAIN), the 10-second timeout, unavailability in live mode, and an explicit instruction: 'Call get_archive_schema first if you don't know the table layout.' This clearly directs the agent on when and how to use the tool relative to alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/MinaProtocol/mina-mcp-server'

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