Skip to main content
Glama

sui_graphql_query

Execute arbitrary GraphQL queries against the Sui blockchain's GraphQL endpoint. Acts as an escape hatch for the agentic dispatcher pattern when no curated tool fits.

Instructions

Run an arbitrary GraphQL query against the Sui GraphQL endpoint. The escape hatch for the agentic dispatcher pattern: when no curated tool fits, the agent crafts its own query. Use sui_graphql_introspect first if you don't know the schema. NOTE: Sui's GraphQL RPC is indexer-backed and already composes the Archival Service under the hood, so an empty/null GraphQL result usually means the indexer doesn't have the entity at the requested level — running a parallel archive query is rarely useful. The right escalation when GraphQL returns null for a known id/digest/checkpoint is to drop to sui_get_object / sui_get_transaction / sui_get_checkpoint with source='auto' (the live→archive fallback covers retention boundary cases the indexer hasn't materialized).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesGraphQL query string.
variablesNoOptional variables map.
networkNoSui network. Defaults to the server's configured default.
Behavior5/5

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

No annotations exist, so description carries full burden. It discloses that GraphQL is indexer-backed, explains the meaning of empty/null results, and describes the escalation path. This provides excellent transparency beyond basic functionality.

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

Conciseness4/5

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

Well-structured with purpose first, then usage guidelines. While slightly lengthy, every sentence adds value. Could be trimmed slightly but still efficient.

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

Completeness5/5

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

Given no output schema and no annotations, the description fully covers behavior, error interpretation, and alternatives. It is complete for a query tool with 3 parameters.

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

Parameters3/5

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

Schema coverage is 100%, so baseline 3. The description adds minimal extra meaning beyond the schema: it confirms optional variables and network default. No significant additional context for parameters.

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 purpose: 'Run an arbitrary GraphQL query against the Sui GraphQL endpoint.' It distinguishes itself as the escape hatch when no curated tool fits, making its role clear.

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?

Provides explicit guidance: use sui_graphql_introspect first if schema unknown, and explains when to drop to other tools (e.g., sui_get_object) when GraphQL returns null. This covers both when to use and when not to use.

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/abhinavg6/sui-mcp-server'

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