Skip to main content
Glama

x402_sentiment

Analyze cryptocurrency sentiment using social media, news, and market data to generate sentiment scores and confidence levels for specific coins.

Instructions

Get real-time crypto sentiment analysis for a specific coin. Price: $0.01 USDC per query.

Analyzes social media, news, and market data to produce sentiment scores. Without X402_PRIVATE_KEY, only the free test endpoint is available.

Returns: sentiment score (-1 to 1), confidence, sources, and analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesCryptocurrency ticker symbol (e.g., 'BTC', 'ETH', 'SOL')

Implementation Reference

  • The handler implementation for the x402_sentiment tool, which fetches sentiment data from either a paid or free endpoint based on the availability of a private key.
    async (params) => {
      const base = APIS.sentiment.baseUrl;
    
      try {
        const usePaid = !!PRIVATE_KEY;
        const endpoint = usePaid
          ? `/sentiment/${params.coin.toLowerCase()}`
          : `/test/sentiment/${params.coin.toLowerCase()}`;
    
        const data = await apiGet(base, endpoint, usePaid);
        return textResult({
          mode: usePaid ? "paid" : "free_test",
          cost: usePaid ? "$0.01" : "free",
          coin: params.coin.toUpperCase(),
          ...data,
        });
  • src/index.ts:358-374 (registration)
    Registration of the x402_sentiment tool, including its description and input schema using Zod.
    server.tool(
      "x402_sentiment",
      `Get real-time crypto sentiment analysis for a specific coin.
    Price: $0.01 USDC per query.
    
    Analyzes social media, news, and market data to produce sentiment scores.
    Without X402_PRIVATE_KEY, only the free test endpoint is available.
    
    Returns: sentiment score (-1 to 1), confidence, sources, and analysis.`,
      {
        coin: z
          .string()
          .regex(/^[A-Z0-9]{1,10}$/i)
          .describe(
            "Cryptocurrency ticker symbol (e.g., 'BTC', 'ETH', 'SOL')"
          ),
      },
Behavior4/5

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

With no annotations provided, the description carries significant burden and performs well. It discloses financial cost ($0.01 USDC per query), authentication requirements, data sources (social media, news, market data), and return value structure (score range -1 to 1, confidence, sources). It could improve by mentioning rate limits or test endpoint restrictions.

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 optimally structured with five high-value sentences: purpose, pricing, methodology, authentication constraints, and return format. It is front-loaded with the core action and contains zero redundant information.

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

Completeness4/5

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

For a single-parameter tool, the description is comprehensive. It compensates for the missing output schema by detailing return values (score, confidence, sources, analysis) and covers critical operational context (cost, auth) that would normally appear in annotations. Minor gaps remain around error handling or rate limiting.

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 input schema has 100% description coverage with clear pattern validation and examples (BTC, ETH, SOL). The description does not explicitly discuss the coin parameter, but given the schema's completeness, no additional parameter semantics are needed in the description text.

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 performs 'real-time crypto sentiment analysis' using social media, news, and market data. It specifies the domain (crypto) and methodology, distinguishing it from generic intelligence or market data tools. However, it doesn't explicitly differentiate from siblings like x402_intelligence or x402_market_overview.

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

Usage Guidelines3/5

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

The description provides important constraints—specifically the $0.01 USDC pricing and X402_PRIVATE_KEY authentication requirement for full access versus the limited test endpoint. However, it lacks explicit guidance on when to choose this over related tools like x402_intelligence or x402_market_overview.

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/jameswilliamwisdom/x402-mcp-server'

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