Skip to main content
Glama
JussCubs

mcp-server-test

by JussCubs

fetch_token_data

Fetch trending Solana tokens from Vector and receive a JSON string with token data.

Instructions

Fetch trending Solana tokens from Vector

Returns:
    JSON string with token data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Tool registration decorator for 'fetch_token_data'
    @mcp.tool(name="fetch_token_data")
  • Handler function that fetches trending Solana tokens from Vector GraphQL API using the TOKENS_LIST_QUERY
    @mcp.tool(name="fetch_token_data")
    async def fetch_token_data(
        ctx: Context = None
    ) -> str:
        """Fetch trending Solana tokens from Vector
        
        Returns:
            JSON string with token data
        """
        if ctx:
            ctx.info("Fetching trending Solana tokens...")
        
        # Hardcoded variables as requested
        variables = {
            "count": 50,
            "cursor": None,
            "filterBy": "(broadcastCount5minV2:>0) && (chain:SOLANA)",
            "query": None,
            "sortBy": "trendingScore5min:desc"
        }
        
        payload = {
            "query": TOKENS_LIST_QUERY,
            "variables": variables
        }
        
        async with httpx.AsyncClient(verify=False) as client:
            try:
                response = await client.post(
                    API_URL, 
                    json=payload, 
                    headers=HEADERS
                )
                response.raise_for_status()
                return response.text
            except Exception as e:
                error_message = f"Error fetching token data: {str(e)}"
                if ctx:
                    ctx.error(error_message)
                return error_message
  • TOKENS_LIST_QUERY GraphQL query definition used by fetch_token_data to fetch token data fields
    # Token list query
    TOKENS_LIST_QUERY = """
    query TokensListRefetchQuery(
        $count: Int = 25
        $cursor: String
        $filterBy: String
        $query: String
        $sortBy: String
    ) {
        searchTokens(query: $query, sortBy: $sortBy, filterBy: $filterBy, after: $cursor, first: $count) {
            edges {
                node {
                    id
                    address
                    chain
                    symbol
                    price
                    supply
                    volume5min
                    volume1h
                    volume6h
                    volume24h
                    broadcastCount5min
                    broadcastCount1h
                    broadcastCount6h
                    broadcastCount24h
                    top10HolderPercentV2
                    firstIndexedTimestamp
                    insiderHoldingPercent
                    devHoldingPercent
                }
            }
        }
    }
    """
  • API_URL and HEADERS config used by fetch_token_data for the HTTP request
    # API endpoint and headers
    API_URL = "https://mainnet-api.vector.fun/graphql"
    HEADERS = {
        "Host": "mainnet-api.vector.fun",
        "content-type": "application/json",
        "X-App-Version": "1.11.0",
        "X-App-Build-Number": "331",
        "accept": "*/*",
        "x-app-name": "Vector",
        "Accept-Language": "en-US;q=1",
        "user-agent": "Vector/331 CFNetwork/1568.200.51 Darwin/24.1.0",
        "pragma": "no-cache",
        "cache-control": "no-cache"
    }
Behavior4/5

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

With no annotations, the description carries full burden. It states 'Fetch' implying read-only and mentions return type (JSON string), which is adequate for a simple tool. Could add more context like rate limits or auth, but not necessary.

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: two lines, front-loaded with the main action and outcome. No redundant information.

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

Completeness5/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 annotations, has output schema), the description fully covers what an agent needs: what it does and what it returns. No missing details for its complexity level.

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?

No parameters exist, so the baseline score is 4 per rubric. Description adds no parameter info, but that is acceptable since there are none.

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 verb 'Fetch' and the resource 'trending Solana tokens from Vector', distinguishing it from sibling tools like fetch_leaderboard and fetch_profile.

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 implies usage for fetching token data, but lacks explicit guidance on when to use this tool versus alternatives (e.g., fetch_token_broadcasts). No when-not or exclusions provided.

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/JussCubs/mcp-server-test'

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