Skip to main content
Glama
tdnupe3

Coin Railz MCP Server

by tdnupe3

optimize_portfolio

Optimize cryptocurrency portfolio allocation using AI recommendations based on risk tolerance and current holdings to improve investment strategy.

Instructions

Get AI-powered portfolio optimization recommendations.

Args: holdings: List of current holdings [{"token": "...", "amount": "...", "chain": "..."}] risk_tolerance: Risk level. Options: low, medium, high

Returns: Rebalancing recommendations and optimal allocation.

Price: $1.00

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
holdingsYes
risk_toleranceNomedium

Implementation Reference

  • The `optimize_portfolio` tool is defined as an async function decorated with `@mcp.tool()`. It handles the user request by building a payload with holdings and risk tolerance, then calls the `portfolio-optimization` service via `call_coinrailz_service`.
    async def optimize_portfolio(holdings: List[dict], risk_tolerance: str = "medium") -> str:
        """
        Get AI-powered portfolio optimization recommendations.
        
        Args:
            holdings: List of current holdings [{"token": "...", "amount": "...", "chain": "..."}]
            risk_tolerance: Risk level. Options: low, medium, high
        
        Returns:
            Rebalancing recommendations and optimal allocation.
        
        Price: $1.00
        """
        payload = {
            "holdings": holdings,
            "riskTolerance": risk_tolerance
        }
        result = await call_coinrailz_service("portfolio-optimization", payload)
        return json.dumps(result, indent=2)

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/tdnupe3/mcp-server-coinrailz'

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