Skip to main content
Glama

t2000_auto_invest

Automate dollar-cost averaging investments by setting up recurring purchases into strategies or individual assets. Manage schedules with setup, status, run, and stop actions.

Instructions

Dollar-cost averaging (DCA) — set up recurring purchases into strategies or individual assets. Actions: setup, status, run, stop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAuto-invest action
amountNoUSD amount per purchase (for 'setup')
frequencyNoPurchase frequency (for 'setup')
strategyNoStrategy name (for 'setup')
assetNoSingle asset (for 'setup', alternative to strategy)
scheduleIdNoSchedule ID (for 'stop')

Implementation Reference

  • The handler implementation for the t2000_auto_invest tool, containing logic for setup, status, run, and stop actions.
    async ({ action, amount, frequency, strategy, asset, scheduleId }) => {
      try {
        switch (action) {
          case 'setup': {
            if (!amount || !frequency) {
              return { content: [{ type: 'text', text: JSON.stringify({ error: 'Amount and frequency required for setup' }) }] };
            }
            const schedule = agent.setupAutoInvest({ amount, frequency, strategy, asset });
            return { content: [{ type: 'text', text: JSON.stringify(schedule) }] };
          }
          case 'status': {
            const status = agent.getAutoInvestStatus();
            return { content: [{ type: 'text', text: JSON.stringify(status) }] };
          }
          case 'run': {
            const result = await mutex.run(() => agent.runAutoInvest());
            return { content: [{ type: 'text', text: JSON.stringify(result) }] };
          }
          case 'stop': {
            if (!scheduleId) {
              return { content: [{ type: 'text', text: JSON.stringify({ error: 'Schedule ID required for stop' }) }] };
            }
            agent.stopAutoInvest(scheduleId);
            return { content: [{ type: 'text', text: JSON.stringify({ stopped: scheduleId }) }] };
          }
          default:
            return { content: [{ type: 'text', text: JSON.stringify({ error: `Unknown action: ${action}` }) }] };
        }
      } catch (err) {
        return errorResult(err);
      }
    },
  • Registration and schema definition for the t2000_auto_invest tool.
    server.tool(
      't2000_auto_invest',
      'Dollar-cost averaging (DCA) — set up recurring purchases into strategies or individual assets. Actions: setup, status, run, stop.',
      {
        action: z.enum(['setup', 'status', 'run', 'stop']).describe("Auto-invest action"),
        amount: z.number().optional().describe("USD amount per purchase (for 'setup')"),
        frequency: z.enum(['daily', 'weekly', 'monthly']).optional().describe("Purchase frequency (for 'setup')"),
        strategy: z.string().optional().describe("Strategy name (for 'setup')"),
        asset: z.string().optional().describe("Single asset (for 'setup', alternative to strategy)"),
        scheduleId: z.string().optional().describe("Schedule ID (for 'stop')"),
      },
Behavior2/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 mentions actions but doesn't describe what each action does (e.g., 'run' might execute a purchase, 'stop' might cancel a schedule), potential side effects (e.g., financial transactions, account changes), or constraints (e.g., permissions needed, rate limits). For a financial tool with multiple actions, this leaves critical behavioral traits unspecified.

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 brief and front-loaded with the core purpose, followed by a list of actions. It wastes no words, but the action list could be integrated more smoothly (e.g., 'Supports actions: setup, status, run, stop'). Overall, it's efficient and well-structured for its length.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (multiple actions for financial operations), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what each action does, what the tool returns, or any behavioral nuances (e.g., idempotency, errors). For a tool with 6 parameters and significant functionality, more context is needed to guide an agent effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema—it implies parameters are used for different actions (e.g., 'amount' for 'setup') but doesn't provide additional semantics like format examples or dependencies. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

The description clearly states the tool's purpose: 'Dollar-cost averaging (DCA) — set up recurring purchases into strategies or individual assets.' It specifies the verb ('set up recurring purchases') and resource ('strategies or individual assets'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 't2000_invest' or 't2000_save', which might have overlapping investment functions.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It lists actions ('setup, status, run, stop') but doesn't explain prerequisites, when to choose this over one-time investment tools, or how it relates to siblings like 't2000_invest'. Without usage context, an agent might struggle to select this tool appropriately.

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