Skip to main content
Glama
armorwallet
by armorwallet

create_order

Create limit, take profit, or stop loss orders on the Armor Crypto MCP server. Define wallet, input/output tokens, amount, duration, and watch fields like price or liquidity to execute trades based on market conditions.

Instructions

Create a order. Can be a limit, take profit or stop loss order.

Expects a CreateOrderRequestContainer, returns a CreateOrderResponseContainer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
create_order_requestsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
create_order_responsesYes

Implementation Reference

  • MCP tool handler function for 'create_order'. Decorated with @mcp.tool() for automatic registration. Validates input, calls armor_client.create_order, handles errors, and returns CreateOrderResponseContainer.
    @mcp.tool()
    async def create_order(create_order_requests: CreateOrderRequestContainer) -> CreateOrderResponseContainer:
        """
        Create a order. Can be a limit, take profit or stop loss order.
        
        Expects a CreateOrderRequestContainer, returns a CreateOrderResponseContainer.
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: CreateOrderResponseContainer = await armor_client.create_order(create_order_requests)
            return result
        except Exception as e:
            return [{"error": str(e)}]
  • Core implementation in ArmorWalletAPIClient that performs the HTTP POST to the Armor API endpoint for creating orders. Prepares payload from CreateOrderRequestContainer and calls _api_call.
    async def create_order(self, data: CreateOrderRequestContainer) -> CreateOrderResponseContainer:
        """Create a order."""
        payload = data.model_dump(exclude_none=True)['create_order_requests']
        return await self._api_call("POST", "transactions/order/create/", payload)
  • Pydantic model defining the structure for a single CreateOrderRequest, used within CreateOrderRequestContainer for input validation.
    class CreateOrderRequest(BaseModel):
        wallet: str = Field(description="name of the wallet")
        input_token: str = Field(description="public address of the input token")
        output_token: str = Field(description="public address of the output token")
        amount: float = Field(description="amount of input token to invest")
        strategy_duration: int = Field(description="duration of the order")
        strategy_duration_unit: Literal["MINUTE", "HOUR", "DAY", "WEEK", "MONTH", "YEAR"] = Field(description="unit of the duration of the order")
        watch_field: Literal["liquidity", "marketCap", "price"] = Field(description="field to watch to execute the order. Can be price, marketCap or liquidity")
        direction: Literal["ABOVE", "BELOW"] = Field(description="whether or not the order is above or below current market value")
        token_address_watcher: str = Field(description="public address of the token to watch. should be output token for limit orders and input token for stop loss and take profit orders")
        target_value: Optional[float] = Field(description="target value to execute the order. You must always specify a target value or delta percentage.")
        delta_percentage: Optional[float] = Field(description="delta percentage to execute the order. You must always specify a target value or delta percentage.")
  • Container Pydantic models for batch input (CreateOrderRequestContainer) and output (CreateOrderResponseContainer) of the create_order tool.
    class CreateOrderRequestContainer(BaseModel):
        create_order_requests: List[CreateOrderRequest]
    
    
    class CreateOrderResponseContainer(BaseModel):
        create_order_responses: List[OrderResponse]
  • The @mcp.tool() decorator registers this function as an MCP tool named 'create_order' in the FastMCP server.
    @mcp.tool()
    async def create_order(create_order_requests: CreateOrderRequestContainer) -> CreateOrderResponseContainer:
        """
        Create a order. Can be a limit, take profit or stop loss order.
        
        Expects a CreateOrderRequestContainer, returns a CreateOrderResponseContainer.
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: CreateOrderResponseContainer = await armor_client.create_order(create_order_requests)
            return result
        except Exception as e:
            return [{"error": str(e)}]
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this creates orders but doesn't mention whether this is a write operation (implied by 'create'), what permissions are required, whether orders are immediately active, potential costs/risks, or what happens on failure. The mention of order types adds some context but insufficient for a mutation tool with zero annotation coverage.

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?

Three sentences total, but the first is grammatically flawed ('a order'). The second sentence about order types adds value. The third sentence about input/output containers is necessary but could be more informative. Overall reasonably concise but could be better structured.

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?

For a complex order creation tool with 1 parameter (but deeply nested structure), no annotations, and 0% schema description coverage, the description is inadequate. While an output schema exists (CreateOrderResponseContainer), the description doesn't explain the order creation process, required fields, or practical usage. It leaves too many gaps for effective tool invocation.

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%, so the description must compensate for undocumented parameters. However, the description provides zero information about the single parameter 'create_order_requests' or its complex nested structure. It only mentions the input/output container types by name without explaining what they contain or how to use them.

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

Purpose3/5

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

The description states 'Create a order' which is a clear verb+resource, but it's grammatically awkward ('a order'). It adds 'Can be a limit, take profit or stop loss order' which provides some specificity about order types, but doesn't distinguish this from sibling tools like 'create_dca_order' or 'cancel_order' beyond the basic creation action.

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?

No guidance on when to use this tool versus alternatives like 'create_dca_order' or 'cancel_order'. The description mentions order types (limit, take profit, stop loss) but doesn't explain when each type is appropriate or provide any context about prerequisites or constraints for using this tool.

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