Skip to main content
Glama
akc2267

Solana MCP Server

by akc2267

getSlot

Retrieve the current slot number on the Solana blockchain using the Solana MCP Server's RPC tool. Essential for tracking block progress and coordinating transactions.

Instructions

Get the current slot

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The asynchronous handler function that implements the getSlot tool logic. It fetches the current Solana blockchain slot using the connection.getSlot() method and returns it in a structured MCP response format, with error handling.
    async () => {
      try {
        const slot = await connection.getSlot();
        return {
          content: [
            {
              type: "text",
              text: `Current slot: ${slot}`,
            },
          ],
        };
      } catch (err) {
        const error = err as Error;
        return {
          content: [
            {
              type: "text",
              text: `Failed to retrieve current slot: ${error.message}`,
            },
          ],
        };
      }
    }
  • src/index.ts:27-54 (registration)
    The server.tool() call that registers the 'getSlot' tool with the MCP server, specifying its name, description, schema (empty), and handler function.
    server.tool(
      "getSlot",
      "Get the current slot",
      {},
      async () => {
        try {
          const slot = await connection.getSlot();
          return {
            content: [
              {
                type: "text",
                text: `Current slot: ${slot}`,
              },
            ],
          };
        } catch (err) {
          const error = err as Error;
          return {
            content: [
              {
                type: "text",
                text: `Failed to retrieve current slot: ${error.message}`,
              },
            ],
          };
        }
      }
    );
  • Empty input schema object, indicating the getSlot tool requires no parameters.
    {},
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. However, it only states 'Get the current slot' without explaining what 'slot' means, whether this is a read-only operation, if it requires authentication, or what the return format might be. This leaves critical behavioral traits undefined, making it inadequate for agent understanding.

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 extremely concise with just three words: 'Get the current slot.' It is front-loaded and wastes no space, making it easy to parse quickly. Every word contributes directly to the tool's purpose, earning its place without unnecessary elaboration.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what a 'slot' is, what data it returns, or how it relates to sibling tools. For a tool with no structured context, the description should provide more clarity about its role and behavior to be sufficiently helpful for an agent.

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 input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description doesn't add parameter details, but since there are no parameters to explain, this is acceptable. The baseline for 0 parameters is 4, as the description doesn't need to compensate for missing parameter information.

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

Purpose2/5

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

The description 'Get the current slot' is a tautology that essentially restates the tool name 'getSlot' without adding meaningful specificity. While it indicates a retrieval action ('Get') and a resource ('slot'), it doesn't clarify what a 'slot' represents in this context or distinguish it from sibling tools like getAccountInfo or getBalance. The purpose remains vague rather than clearly defined.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any context, prerequisites, or exclusions, and it fails to differentiate it from sibling tools such as getAccountInfo or getBalance. Without any usage instructions, the agent has no basis for selecting this tool appropriately.

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

Related 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/akc2267/solana-mcp-server'

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