Skip to main content
Glama

get_all_orders

Retrieve all limit, take profit, and stop loss orders from cryptocurrency trading operations to monitor and manage active trading positions.

Instructions

Retrieve all limit, take profit and stop loss orders.

Returns a list of orders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
get_all_orders_requestsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_order_responsesYes

Implementation Reference

  • The handler function decorated with @mcp.tool(), which registers and implements the get_all_orders tool by delegating to armor_client.list_orders with authentication check and error handling.
    @mcp.tool()
    async def get_all_orders(get_all_orders_requests: ListOrderRequest) -> ListOrderResponseContainer:
        """
        Retrieve all limit, take profit and stop loss orders.
        
        Returns a list of orders.
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: ListOrderResponseContainer = await armor_client.list_orders(get_all_orders_requests)
            return result
        except Exception as e:
            return [{"error": str(e)}]
  • Pydantic model defining the input schema for get_all_orders tool: optional status filter and limit.
    class ListOrderRequest(BaseModel):
        status: Optional[Literal["OPEN", "CANCELLED", "EXPIRED", "COMPLETED", "FAILED", "IN_PROCESS"]] = Field(description="status of the orders, if specified filters results.")
        limit: Optional[int] = Field(default=30, description="number of most recent results to return")
  • Pydantic model defining the output schema container for the tool response: list of OrderResponse objects.
    class ListOrderResponseContainer(BaseModel):
        list_order_responses: List[OrderResponse]
  • Supporting method in ArmorWalletAPIClient that performs the actual API call to list orders using the input request.
    async def list_orders(self, data: ListOrderRequest) -> ListOrderResponseContainer:
        """List all orders."""
        payload = data.model_dump(exclude_none=True)
        return await self._api_call("POST", f"transactions/order/", payload)
  • Detailed Pydantic model for individual OrderResponse used in the tool's output.
    class OrderResponse(BaseModel):
        id: str = Field(description="unique identifier of the order")
        amount: float = Field(description="amount of tokens to invest")
        status: str = Field(description="current status of the 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")
        execution_type: Literal["LIMIT", "STOP_LOSS", "TAKE_PROFIT"] = Field(description="type of the order")
        expiry_time: str = Field(description="expiry time of the order in ISO format")
        watchers: List[OrderWatcher] = Field(description="list of watchers for the order")
        transaction: Optional[dict] = Field(description="transaction details if any", default=None)
        created: str = Field(description="ISO 8601 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 provided, the description carries full burden but offers minimal behavioral insight. It mentions the return type ('list of orders') but doesn't cover critical aspects like pagination, rate limits, authentication requirements, or whether this is a read-only operation (implied by 'retrieve' but not explicit).

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 with two sentences that directly state the action and return value. It's front-loaded with the main purpose, though it could be more structured by explicitly separating purpose from output details.

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

Completeness3/5

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

Given the presence of an output schema (which handles return values) and no annotations, the description is minimally adequate but incomplete. It covers the basic purpose but fails to address parameter semantics, usage context, or behavioral details needed for a tool with undocumented parameters.

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%, and the description provides no information about the single required parameter 'get_all_orders_requests'. The description doesn't explain what this parameter expects, its format, or its purpose, leaving the parameter completely undocumented.

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 verb 'retrieve' and the resource 'limit, take profit and stop loss orders', making the purpose understandable. However, it doesn't distinguish this tool from potential sibling order-related tools like 'list_dca_orders' or 'cancel_order', which would require more specific differentiation.

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 is provided on when to use this tool versus alternatives like 'list_dca_orders' or 'cancel_order'. The description lacks context about prerequisites, timing, or comparison with other order-related tools in the sibling list.

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