Skip to main content
Glama

get_sol_price

Retrieve the current SOL/USD exchange rate to monitor Solana token values for trading decisions or wallet management.

Instructions

Get the current SOL/USD price.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the get_sol_price tool logic by calling the getSolPrice helper.
    export async function handleGetSolPrice(): Promise<string> {
      try {
        const price = await getSolPrice();
        return JSON.stringify({
          success: true,
          solPriceUsd: price,
        });
      } catch (error) {
        return JSON.stringify({
          success: false,
          error: error instanceof Error ? error.message : String(error),
        });
      }
    }
  • Helper function that performs the API request to fetch the SOL/USD price.
    export async function getSolPrice(): Promise<number> {
      const data = await apiGet('/api/solana-price');
      return (data.solanaPrice as number) || 0;
    }
  • Schema definition for the get_sol_price tool.
    export const getSolPriceSchema = z.object({});
Behavior3/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. It discloses the tool's behavior as fetching a current price, implying it's a read-only operation with no destructive effects. However, it lacks details on data sources, rate limits, error handling, or response format, leaving gaps in behavioral context.

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 a single, efficient sentence that directly states the tool's function with no unnecessary words. It is front-loaded and wastes no space, making it easy to parse quickly.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but minimal. It covers the basic purpose but lacks context on usage, behavioral traits like reliability or latency, and output details, which could be 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, so no parameter documentation is needed. The description appropriately adds no parameter details, focusing only on the tool's purpose. This meets the baseline for tools with no 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 specific action ('Get') and resource ('current SOL/USD price'), with no ambiguity. It distinguishes itself from siblings like 'detect_dex', 'get_token_info', and 'scan_wallet' by focusing solely on price retrieval for a specific cryptocurrency pair.

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

Usage Guidelines2/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 does not mention scenarios where it's appropriate (e.g., real-time price checks) or when other tools might be better (e.g., using 'get_token_info' for broader token data).

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/RefundYourSOL/refundyoursol-mcp'

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