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);
Behavior3/5

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

Annotations are absent, so description carries full burden. States 'Save' implying persistence, but does not clarify if calls overwrite or append, validation rules for asset names, or session vs permanent storage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two efficient sentences with front-loaded purpose. The inline example is dense but high-value. No redundancy, though could benefit from line breaks for readability.

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?

Adequate for a setter with complete schema coverage and helpful example. Missing clarification on update semantics (overwrite vs modify) and whether this is required before calling get_portfolio_analysis.

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?

Schema coverage is 100%, but the concrete JSON example adds significant value by showing exact format, asset naming conventions (fullname vs ticker), and implied data types in context.

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?

Clear verb 'Save' and resource 'portfolio holdings' with explicit outcome 'personalized guidance'. Distinguishes from getter siblings but does not clarify relationship vs other 'set_' tools like set_custom_strategy.

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?

States the outcome benefit (personalized guidance) implying when to use it, but lacks explicit when-not guidance or comparison to alternatives like manual state management.

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

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