Skip to main content
Glama
desk3
by desk3

get_mini_24hr

Retrieve 24-hour cryptocurrency ticker data for specific trading pairs or all symbols to monitor market performance and price changes.

Instructions

Get 24-hour mini ticker info, supports symbol parameter

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolNoTrading pair symbol in format like BTCUSDT, ETHUSDT, etc. Leave empty to get all symbols.

Implementation Reference

  • The main handler function that fetches 24-hour mini ticker information by making an API request to the Desk3 endpoint, handling optional symbol parameter.
    async def get_mini_24hr(symbol: str | None = None) -> list[dict[str, Any]]:
        """
        Get 24-hour mini ticker information.
        :param symbol: Trading pair, comma separated for multiple, return all if not provided
        :return: Mini ticker info array
        """
        url = 'https://mcp.desk3.io/v1/market/mini/24hr'
        params = {}
        if symbol:
            params['symbol'] = symbol
        try:
            return request_api('get', url, params=params)
        except Exception as e:
            raise RuntimeError(f"Failed to fetch mini 24hr data: {e}")
  • Registration of the 'get_mini_24hr' tool in the MCP server's list_tools handler, including description and JSON schema for input validation.
    types.Tool(
        name="get_mini_24hr",
        description="Get 24-hour mini ticker info, supports symbol parameter",
        inputSchema={
            "type": "object",
            "properties": {
                "symbol": {
                    "type": "string",
                    "description": "Trading pair symbol in format like BTCUSDT, ETHUSDT, etc. Leave empty to get all symbols.",
                    "examples": ["BTCUSDT", "ETHUSDT", "BNBUSDT"],
                    "pattern": "^[A-Z0-9]+$"
                },
            },
            "required": [],
        },
  • Input schema definition for the 'get_mini_24hr' tool, specifying optional 'symbol' parameter with validation rules.
    inputSchema={
        "type": "object",
        "properties": {
            "symbol": {
                "type": "string",
                "description": "Trading pair symbol in format like BTCUSDT, ETHUSDT, etc. Leave empty to get all symbols.",
                "examples": ["BTCUSDT", "ETHUSDT", "BNBUSDT"],
                "pattern": "^[A-Z0-9]+$"
            },
        },
        "required": [],
  • Tool execution dispatcher case in the MCP server's call_tool handler that invokes the get_mini_24hr function and formats the response.
    case "get_mini_24hr":
        symbol = arguments.get("symbol") if arguments else None
        try:
            data = await get_mini_24hr(symbol=symbol)
            return [
                types.TextContent(
                    type="text",
                    text=json.dumps(data, indent=2),
                )
            ]
        except Exception as e:
  • Shared helper function used by get_mini_24hr to perform authenticated API requests to Desk3 endpoints.
    def request_api(method: str, url: str, params: dict = None, data: dict = None) -> any:
        headers = {
            'Accepts': 'application/json',
            'X-DESK3_PRO_API_KEY': API_KEY,
        }
        try:
            logging.info(f"Requesting {method.upper()} {url} params={params} data={data}")
            if method.lower() == 'get':
                response = requests.get(url, headers=headers, params=params)
            elif method.lower() == 'post':
                response = requests.post(url, headers=headers, json=data)
            else:
                raise ValueError(f"Unsupported HTTP method: {method}")
            response.raise_for_status()
            logging.info(f"Response {response.status_code} for {url}")
            return json.loads(response.text)
        except Exception as e:
            logging.error(f"Error during {method.upper()} {url}: {e}")
            raise
Behavior2/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. It states what the tool does but lacks critical behavioral details such as whether this is a read-only operation, rate limits, authentication requirements, or what the output format looks like (e.g., JSON structure, error handling). This leaves significant gaps for an agent to use it effectively.

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—a single sentence that directly states the tool's function and key parameter support. It is front-loaded with the core purpose and wastes no words, making it efficient for quick understanding.

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 for effective tool use. It doesn't explain the return values (e.g., what 'mini ticker info' includes), error conditions, or behavioral constraints. For a data-fetching tool with no structured output documentation, this leaves the agent with insufficient context.

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?

The description mentions that the tool 'supports symbol parameter,' which aligns with the input schema's single parameter. However, with 100% schema description coverage, the schema already fully documents the parameter's purpose, format, examples, and optionality. The description adds minimal value beyond what the schema provides, meeting the baseline for high coverage.

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?

The description clearly states the action ('Get') and resource ('24-hour mini ticker info'), making the purpose understandable. It specifies the scope of data (24-hour ticker info) but doesn't distinguish this tool from potential sibling tools that might also provide ticker or market data, which prevents a perfect score.

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 mentions that the tool 'supports symbol parameter,' which implies optional filtering, but provides no explicit guidance on when to use this tool versus alternatives. Given the sibling tools include various market indicators (e.g., get_fear_greed_index, get_exchange_rate), there's no indication of when this ticker data is preferred over other market metrics.

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/desk3/cryptocurrency-mcp-server'

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