Skip to main content
Glama

t2000_strategy

Manage investment strategies to buy, sell, rebalance, or create custom asset allocations within the t2000 MCP server for automated portfolio management.

Instructions

Manage investment strategies — buy into predefined or custom allocations, sell entire strategies, check status, rebalance, or create/delete custom strategies. IMPORTANT: Before buying, ALWAYS call with action "list" first to show the user the strategy allocations (e.g. All-Weather = 30% BTC, 20% ETH, 20% SUI, 30% GOLD), then use dryRun: true to preview estimated amounts and prices. Only execute after the user confirms. If checking balance is insufficient, the SDK will auto-withdraw from savings — no manual withdraw needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesStrategy action to perform
nameNoStrategy name (required for all actions except 'list')
amountNoUSD amount (required for 'buy')
allocationsNoAllocation map e.g. {SUI: 40, BTC: 20, ETH: 20, GOLD: 20} (for 'create')
descriptionNoStrategy description (for 'create')
dryRunNoPreview without signing (for 'buy')

Implementation Reference

  • The handler for the 't2000_strategy' tool, which processes actions like list, buy, sell, status, rebalance, create, and delete for investment strategies using the 'agent' object.
    async ({ action, name, amount, allocations, description, dryRun }) => {
      try {
        if (action === 'list') {
          const all = agent.strategies.getAll();
          return { content: [{ type: 'text', text: JSON.stringify(all) }] };
        }
    
        if (!name) {
          return { content: [{ type: 'text', text: JSON.stringify({ error: 'Strategy name is required' }) }] };
        }
    
        switch (action) {
          case 'buy': {
            if (typeof amount !== 'number') {
              return { content: [{ type: 'text', text: JSON.stringify({ error: 'Amount is required for buy' }) }] };
            }
            const result = await mutex.run(() => agent.investStrategy({ strategy: name, usdAmount: amount, dryRun }));
            return { content: [{ type: 'text', text: JSON.stringify(result) }] };
          }
          case 'sell': {
            const result = await mutex.run(() => agent.sellStrategy({ strategy: name }));
            return { content: [{ type: 'text', text: JSON.stringify(result) }] };
          }
          case 'status': {
            const result = await agent.getStrategyStatus(name);
            return { content: [{ type: 'text', text: JSON.stringify(result) }] };
          }
          case 'rebalance': {
            const result = await mutex.run(() => agent.rebalanceStrategy({ strategy: name }));
            return { content: [{ type: 'text', text: JSON.stringify(result) }] };
          }
          case 'create': {
            if (!allocations) {
              return { content: [{ type: 'text', text: JSON.stringify({ error: 'Allocations required for create' }) }] };
            }
            const def = agent.strategies.create({ name, allocations, description });
            return { content: [{ type: 'text', text: JSON.stringify(def) }] };
          }
          case 'delete': {
            agent.strategies.delete(name);
            return { content: [{ type: 'text', text: JSON.stringify({ deleted: name }) }] };
          }
          default:
  • Input schema definition for the 't2000_strategy' tool, defining parameters such as action, name, amount, allocations, description, and dryRun.
    {
      action: z.enum(['list', 'buy', 'sell', 'status', 'rebalance', 'create', 'delete']).describe("Strategy action to perform"),
      name: z.string().optional().describe("Strategy name (required for all actions except 'list')"),
      amount: z.number().optional().describe("USD amount (required for 'buy')"),
      allocations: z.record(z.number()).optional().describe("Allocation map e.g. {SUI: 40, BTC: 20, ETH: 20, GOLD: 20} (for 'create')"),
      description: z.string().optional().describe("Strategy description (for 'create')"),
      dryRun: z.boolean().optional().describe("Preview without signing (for 'buy')"),
    },
  • Tool registration for 't2000_strategy' within the MCP server setup.
    server.tool(
      't2000_strategy',
      'Manage investment strategies — buy into predefined or custom allocations, sell entire strategies, check status, rebalance, or create/delete custom strategies. IMPORTANT: Before buying, ALWAYS call with action "list" first to show the user the strategy allocations (e.g. All-Weather = 30% BTC, 20% ETH, 20% SUI, 30% GOLD), then use dryRun: true to preview estimated amounts and prices. Only execute after the user confirms. If checking balance is insufficient, the SDK will auto-withdraw from savings — no manual withdraw needed.',
      {
        action: z.enum(['list', 'buy', 'sell', 'status', 'rebalance', 'create', 'delete']).describe("Strategy action to perform"),
        name: z.string().optional().describe("Strategy name (required for all actions except 'list')"),
        amount: z.number().optional().describe("USD amount (required for 'buy')"),
        allocations: z.record(z.number()).optional().describe("Allocation map e.g. {SUI: 40, BTC: 20, ETH: 20, GOLD: 20} (for 'create')"),
        description: z.string().optional().describe("Strategy description (for 'create')"),
        dryRun: z.boolean().optional().describe("Preview without signing (for 'buy')"),
      },
      async ({ action, name, amount, allocations, description, dryRun }) => {
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It thoroughly describes critical behaviors: the multi-action workflow, the auto-withdraw feature for insufficient balances, the importance of user confirmation before execution, and the preview capability with dryRun. This goes well beyond what the input schema provides about parameters.

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?

The description is appropriately sized and front-loaded with the core purpose, followed by important usage guidelines. Every sentence adds value, though the second sentence is quite long and could be structured more clearly. The information density is high with minimal waste.

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?

Given the tool's complexity (6 parameters, multiple actions, financial operations) and lack of both annotations and output schema, the description does an excellent job covering usage workflow, behavioral expectations, and parameter relationships. The main gap is the absence of output format information, which would be helpful given the multiple action types.

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 description coverage is 100%, so the baseline is 3. The description adds significant value by explaining the semantic relationships between parameters: the workflow linking 'list', 'dryRun', and 'buy' actions; that 'name' is required for most actions; and the purpose of 'allocations' for custom strategies. However, it doesn't provide format examples for all parameters beyond the allocations example.

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 tool's purpose with specific verbs ('manage', 'buy', 'sell', 'check', 'rebalance', 'create', 'delete') and resources ('investment strategies', 'predefined or custom allocations'), distinguishing it from sibling tools like t2000_invest or t2000_rebalance by focusing on strategy-level operations rather than individual investments or portfolio rebalancing.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when and how to use the tool, including a step-by-step workflow (call with action 'list' first, then use dryRun: true, execute after user confirmation), prerequisites (checking balance), and behavioral notes (auto-withdraw from savings if insufficient balance). It clearly differentiates this tool's purpose from alternatives like t2000_invest or t2000_rebalance.

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/mission69b/t2000'

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