Skip to main content
Glama

get_pair_details

Retrieve detailed information about specific trading pairs on the Casper Network's CSPR.trade DEX, including contract hash and currency data.

Instructions

Get detailed information about a specific trading pair

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairYesPair contract package hash (e.g., "hash-abc123...")
currencyNoFiat currency code

Implementation Reference

  • The actual API client method that fetches pair details from the backend.
    async getPairDetails(contractPackageHash: string, currencyId?: number): Promise<Pair> {
      const response = await this.http.get<ApiResponse<PairApiResponse>>(
        `/pairs/${contractPackageHash}`,
        {
          includes: currencyId !== undefined ? `csprtrade_data(${currencyId})` : undefined,
        }
      );
      return mapPair(response.data);
  • MCP tool registration for 'get_pair_details' and its handler logic which calls the SDK client.
    server.tool(
      'get_pair_details',
      'Get detailed information about a specific trading pair',
      {
        pair: z.string().describe('Pair contract package hash (e.g., "hash-abc123...")'),
        currency: z.string().optional().describe('Fiat currency code'),
      },
      async ({ pair, currency }) => {
        const result = await client.getPairDetails(pair, currency);
        return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }] };
      },
    );
Behavior2/5

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

No annotations provided, so description carries full burden of behavioral disclosure. 'Get' implies read-only but doesn't explicitly confirm this, nor does it mention caching, rate limits, or response size. Fails to disclose what 'detailed' encompasses.

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?

Single sentence, front-loaded with action and resource. No redundancy or wasted words. Appropriate length for the tool's complexity.

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?

Minimal but adequate for a simple 2-parameter read tool. Lacks output specification (no output schema exists), but 'detailed information' hints at comprehensive data. Sufficient for agent selection though richer context on return values would help.

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% with both parameters well-documented in the schema ('Pair contract package hash', 'Fiat currency code'). Description adds no parameter-specific guidance, meeting the baseline for high-coverage schemas.

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

Purpose4/5

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

Clear verb ('Get') and resource ('trading pair'), and 'specific' distinguishes from sibling 'get_pairs'. However, 'detailed information' is vague and doesn't specify what data is returned (e.g., reserves, prices, metadata).

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?

Provides no guidance on when to use this versus 'get_pairs' (to discover pairs) or 'get_quote' (for pricing). Doesn't mention that 'pair' parameter requires a contract hash likely obtained from 'get_pairs' first.

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/make-software/cspr-trade-mcp'

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