Skip to main content
Glama
desk3
by desk3

get_btc_trend

Analyze Bitcoin market trends by retrieving historical data including price, active addresses, new addresses, and transaction addresses over a 3-month period.

Instructions

Get BTC trend chart for the past 3 months. Format: [[date, price, active addresses, new addresses, transaction addresses]]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the 'get_btc_trend' tool. It performs an HTTP GET request to the external Desk3 API to retrieve BTC trend data for the past 3 months and returns it as a list of lists.
    async def get_btc_trend() -> list[list]:
        """
        Get BTC trend chart for the past 3 months.
        :return: List of [date, price, active addresses, new addresses, transaction addresses]
        """
        url = 'https://mcp.desk3.io/v1/market/btc/trend'
        try:
            return request_api('get', url)
        except Exception as e:
            raise RuntimeError(f"Failed to fetch BTC trend data: {e}")
  • Registration of the 'get_btc_trend' tool in the MCP server's list_tools handler, including name, description, and empty input schema (no parameters required).
    types.Tool(
        name="get_btc_trend",
        description="Get BTC trend chart for the past 3 months. Format: [[date, price, active addresses, new addresses, transaction addresses]]",
        inputSchema={
            "type": "object",
            "properties": {},
            "required": [],
        },
    ),
  • Input JSON schema for the 'get_btc_trend' tool, defining an empty object with no properties or required fields.
    inputSchema={
        "type": "object",
        "properties": {},
        "required": [],
    },
  • Tool execution dispatcher in the MCP server's call_tool handler. It invokes the get_btc_trend function and formats the result as TextContent for the MCP protocol.
    case "get_btc_trend":
        try:
            data = await get_btc_trend()
            return [
                types.TextContent(
                    type="text",
                    text=json.dumps(data, indent=2),
                )
            ]
        except Exception as e:
            raise RuntimeError(f"Failed to fetch BTC trend data: {e}")
  • Shared helper function used by get_btc_trend (and other tools) to make authenticated HTTP requests to the Desk3 API.
    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 the tool returns a chart with specific data points (price, active addresses, etc.) but doesn't mention whether this is a read-only operation, if there are rate limits, authentication requirements, data freshness, or error conditions. The description provides basic output format but lacks critical 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 extremely concise with just two sentences that efficiently convey the core functionality and output format. Every word earns its place - the first sentence states what the tool does, and the second specifies the exact return format. No wasted words or unnecessary elaboration.

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 this is a parameterless tool with no output schema, the description provides the essential information about what data it returns and in what format. However, it lacks important context about data sources, update frequency, timezone considerations for dates, and how this differs from similar tools. For a financial data tool, more completeness would be beneficial.

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 tool has zero parameters (schema coverage 100%), so the baseline score is 4. The description appropriately doesn't discuss parameters since none exist, and it instead focuses on what the tool returns, which is reasonable given the parameterless nature of this tool.

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 tool's purpose: 'Get BTC trend chart for the past 3 months.' It specifies the resource (BTC trend chart) and timeframe (past 3 months), but doesn't explicitly differentiate from sibling tools like 'get_eth_trend' or 'get_cycle_indicators' beyond mentioning BTC specifically.

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 doesn't mention sibling tools like 'get_eth_trend' for Ethereum data or 'get_cycle_indicators' for broader market analysis, nor does it specify any prerequisites, constraints, or recommended contexts for usage.

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