Skip to main content
Glama

set_portfolio_context

Provide your cryptocurrency portfolio holdings to receive personalized financial guidance and analysis from Fathom's intelligence tools.

Instructions

Save your portfolio holdings so Fathom can give personalized guidance. Pass an array of holdings with asset name and amount. Example: [{asset: "bitcoin", amount: 2}, {asset: "solana", amount: 50}, {asset: "usdc", amount: 10000}].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
holdingsYesArray of portfolio holdings

Implementation Reference

  • The implementation of the `set_portfolio_context` tool, which calls `setPortfolio` and returns a result with agent guidance.
    export function setPortfolioContext(holdings: PortfolioHolding[]): SetPortfolioResult {
      const portfolio = setPortfolio(AGENT_ID, holdings);
    
      return {
        success: true,
        agent_id: AGENT_ID,
        holdings_count: holdings.length,
        updated_at: portfolio.updated_at,
        agent_guidance: `Portfolio context saved with ${holdings.length} position${holdings.length === 1 ? '' : 's'}. Call get_portfolio_analysis to receive personalized guidance based on current market conditions. Call get_reality_check to see how your portfolio aligns with the current regime.`,
      };
    }
  • The interface definition for the result returned by `set_portfolio_context`.
    export interface SetPortfolioResult {
      success: boolean;
      agent_id: string;
      holdings_count: number;
      updated_at: string;
      agent_guidance: string;
    }
  • src/index.ts:226-226 (registration)
    Registration/invocation of the tool in the main index file.
    const result = setPortfolioContext(holdings);

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/0xHashy/fathom-fyi'

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