Skip to main content
Glama
armorwallet
by armorwallet

create_dca_order

Automate recurring crypto investments by setting up Dollar-Cost Averaging (DCA) orders. Specify tokens, amounts, frequency, and conditions for targeted trading strategies.

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', decorated with @mcp.tool(), handles authentication check and proxies the request to the ArmorWalletAPIClient.
    @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)}]
  • Helper method in ArmorWalletAPIClient that constructs the API payload and makes the POST request to the '/transactions/dca-order/create/' endpoint to create the DCA order.
    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 schema for individual DCAOrderRequest used within DCAOrderRequestContainer for input validation.
    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 container schema for the tool input, wrapping a list of DCAOrderRequest objects.
    class DCAOrderRequestContainer(BaseModel):
        dca_order_requests: List[DCAOrderRequest]
  • Pydantic schema for DCAOrderResponse, representing the output structure of a created DCA order.
    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")
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. The description only states what the tool expects and returns, without explaining whether this is a write operation, what permissions are needed, whether it's idempotent, what side effects occur, or how errors are handled. For a financial transaction tool with zero annotation coverage, this is critically insufficient.

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

Conciseness3/5

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

The description is extremely concise (two sentences) and front-loaded with the main action. However, this brevity comes at the cost of being under-specified rather than efficiently informative. While structurally simple, it lacks the necessary detail to be truly helpful.

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

Completeness1/5

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

Given the complexity of financial DCA orders, zero annotation coverage, 0% schema description coverage, and the presence of an output schema, the description is completely inadequate. It doesn't explain the domain concept, required inputs, behavioral characteristics, or relationship to sibling tools. The output schema existence doesn't compensate for the fundamental lack of context about what this tool actually does.

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

Parameters1/5

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

Schema description coverage is 0%, meaning no parameters are documented in the schema. The description mentions 'DCAOrderRequestContainer' but provides no explanation of what this contains, what fields are required, or their meanings. With 1 parameter (a complex nested object) completely undocumented, the description fails to compensate for the schema's deficiencies.

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' is a tautology that restates the tool name without adding meaningful context. It doesn't explain what a DCA (Dollar Cost Averaging) order is, what resource it creates, or how it differs from sibling tools like 'create_order'. The purpose is stated but remains vague without domain-specific clarification.

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 about when to use this tool versus alternatives. The description doesn't mention prerequisites, appropriate contexts, or distinctions from related tools like 'create_order' or 'cancel_dca_order'. Without any usage context, an agent cannot determine when this tool is the correct choice.

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

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

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