Skip to main content
Glama

create_dca_order

Automate recurring cryptocurrency purchases through dollar-cost averaging to build positions gradually and reduce market timing risks.

Instructions

Create a DCA order.

Expects a DCAOrderRequestContainer, returns a list of DCAOrderResponse.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dca_order_requestsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'create_dca_order'. This is the primary execution function for the MCP tool, decorated with @mcp.tool() which handles registration. It validates input via type hints, checks authentication, calls the underlying client API, and returns results or errors.
    @mcp.tool()
    async def create_dca_order(dca_order_requests: DCAOrderRequestContainer) -> List[DCAOrderResponse]:
        """
        Create a DCA order.
        
        Expects a DCAOrderRequestContainer, returns a list of DCAOrderResponse.
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: List[DCAOrderResponse] = await armor_client.create_dca_order(dca_order_requests)
            return result
        except Exception as e:
            return [{"error": str(e)}]
  • Underlying client method in ArmorWalletAPIClient that serializes the DCAOrderRequestContainer to JSON payload and makes a POST API call to the backend endpoint 'transactions/dca-order/create/' to execute the DCA order creation.
    async def create_dca_order(self, data: DCAOrderRequestContainer) -> List[DCAOrderResponse]:
        """Create a DCA order."""
        # payload = [v.model_dump() for v in data.dca_order_requests]
        payload = data.model_dump(exclude_none=True)['dca_order_requests']
        return await self._api_call("POST", "transactions/dca-order/create/", payload)
  • Pydantic container model for input: wraps a list of DCAOrderRequest objects, used for batch operations.
    class DCAOrderRequestContainer(BaseModel):
        dca_order_requests: List[DCAOrderRequest]
  • Pydantic model defining the input schema for a single DCA order request, including wallet, tokens, amount, schedule, duration, execution type, and optional conditional watchers.
    class DCAOrderRequest(BaseModel):
        wallet: str = Field(description="name of the wallet")
        input_token: str = Field(description="public address of the input token. To get the address from a token symbol use `get_token_details`")
        output_token: str = Field(description="public address of the output token. To get the address from a token symbol use `get_token_details`")
        amount: float = Field(description="total amount of input token to invest")
        cron_expression: str = Field(description="cron expression for the DCA worker execution frequency")
        strategy_duration_unit: Literal["MINUTE", "HOUR", "DAY", "WEEK", "MONTH", "YEAR"] = Field(description="unit of the duration of the DCA order")
        strategy_duration: int = Field(description="Total running time of the DCA order given in strategy duration units, should be more than 0")
        execution_type: Literal["MULTIPLE", "SINGLE"] = Field(description="set to SINGLE only if the user is asking for a single scheduled order, MULTIPLE if it is a true DCA")
        token_address_watcher: Optional[str] = Field(description="If the DCA is conditional, public address of the token to watch.")
        watch_field: Optional[Literal["liquidity", "marketCap", "price"]] = Field(description="If the DCA is conditional, field to watch for the condition")
        delta_type: Optional[Literal["INCREASE", "DECREASE", "MOVE", "MOVE_DAILY", "AVERAGE_MOVE"]] = Field(description="If the DCA is conditional, the operator of the watch field in the conditional statement")
        delta_percentage: Optional[float] = Field(description="If the DCA is conditional, percentage of the change to watch for given the delta_type")
        time_zone: Optional[str] = Field(description="user's time zone. Defaults to UTC")
  • Pydantic model defining the output schema for a DCA order response, including order details, status, token info, watchers, and transactions.
    class DCAOrderResponse(BaseModel):
        id: str = Field(description="id of the DCA order")
        amount: float = Field(description="amount of tokens to invest")
        investment_per_cycle: float = Field(description="amount of tokens to invest per cycle")
        cycles_completed: int = Field(description="number of cycles completed")
        total_cycles: int = Field(description="total number of cycles")
        human_readable_expiry: str = Field(description="human readable expiry date of the DCA order")
        status: str = Field(description="status of the DCA order")
        input_token_data: TokenData = Field(description="details of the input token")
        output_token_data: TokenData = Field(description="details of the output token")
        wallet_name: str = Field(description="name of the wallet")
        watchers: List[DCAWatcher] = Field(description="list of watchers for the DCA order")
        dca_transactions: List[dict] = Field(description="list of DCA transactions")  # Can be further typed if structure is known
        created: str = Field(description="Linux timestamp of the creation of the order")
Behavior2/5

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

With no annotations, the description carries full burden but provides minimal behavioral insight. 'Create' implies a write operation, but it does not disclose permissions needed, side effects, error conditions, or rate limits. It mentions input/output types but lacks operational context.

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 action. However, the second sentence is somewhat redundant with the schema and could be more informative, slightly reducing efficiency.

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 complexity of a creation tool with no annotations and 0% schema coverage, the description is inadequate. It does not explain what a DCA order is, its purpose, or how it interacts with the system, despite having an output schema.

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 0%, so the description must compensate. It names the parameter (DCAOrderRequestContainer) but does not explain its structure, required fields, or semantics. This adds minimal value beyond the schema, warranting a baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create a DCA order' restates the tool name without adding specificity. It mentions the input type (DCAOrderRequestContainer) and output (list of DCAOrderResponse), but does not explain what a DCA order is, what resource it creates, or how it differs from sibling tools like create_order or cancel_dca_order.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives. The description does not mention prerequisites, context, or comparisons to sibling tools like create_order or list_dca_orders, leaving the agent with no usage direction.

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/emmaThompson07/armor-crypto-mcp'

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