Skip to main content
Glama
alpacahq

alpaca-mcp-server

Official
by alpacahq

get_orders

Retrieve and format trading orders from Alpaca using filters for status, symbols, timeframes, and asset classes to monitor and analyze portfolio activity.

Instructions

Retrieves and formats orders with the specified filters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoOrder status to be queried. open, closed or all. Defaults to open.
limitNoThe maximum number of orders in response. Defaults to 50 and max is 500.
afterNoThe response will include only ones submitted after this timestamp (exclusive.)
untilNoThe response will include only ones submitted until this timestamp (exclusive.)
directionNoThe chronological order of response based on the submission time. asc or desc. Defaults to desc.
nestedNoIf true, the result will roll up multi-leg orders under the legs field of primary order.
symbolsNoA comma-separated list of symbols to filter by (ex. “AAPL,TSLA,MSFT”). A currency pair is required for crypto orders (ex. “BTCUSD,BCHUSD,LTCUSD,ETCUSD”).
sideNoFilters down to orders that have a matching side field set.
asset_classNoA comma-separated list of asset classes, the response will include only orders in the specified asset classes. By specifying `us_option` as the class, you can query option orders by underlying symbol using the symbols parameter.
before_order_idNoReturn orders submitted before the order with this ID (exclusive). Mutually exclusive with `after_order_id`. Do not combine with `after`/`until`.
after_order_idNoReturn orders submitted after the order with this ID (exclusive). Mutually exclusive with `before_order_id`. Do not combine with `after`/`until`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Retrieves and formats' implies a read-only operation, but it doesn't specify whether this requires authentication, has rate limits, returns paginated results, or what the output format looks like. The mention of 'formats' is vague and doesn't explain how orders are formatted or structured in the response. For a tool with 11 parameters and no annotation coverage, this is insufficient.

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 a single, efficient sentence that gets straight to the point without unnecessary words. It's appropriately sized for a tool with a clear purpose, though it could be slightly more informative without losing conciseness. There's no fluff or redundant phrasing.

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 complexity (11 parameters, no annotations, but with output schema), the description is minimally adequate. The output schema exists, so the description doesn't need to explain return values, but it lacks context on behavioral aspects like authentication, rate limits, or error handling. For a retrieval tool with many filters, more guidance on usage and constraints would improve completeness.

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?

The description mentions 'with the specified filters,' which aligns with the 11 filtering parameters in the schema. However, with 100% schema description coverage, the schema already documents all parameters thoroughly (e.g., defaults, constraints, examples). The description adds no additional semantic context beyond what's in the schema, such as explaining filter interactions or typical usage patterns, so it meets the baseline but doesn't enhance understanding.

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 ('Retrieves and formats') and resource ('orders'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'get_order_by_id' or 'get_order_by_client_id', which also retrieve orders but with different approaches. The mention of 'with the specified filters' hints at filtering capability but doesn't explicitly differentiate from those sibling tools.

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 doesn't mention sibling tools like 'get_order_by_id' (for single orders by ID) or 'get_order_by_client_id' (for single orders by client ID), nor does it explain that this is for retrieving multiple orders with filtering. There's no context about prerequisites, dependencies, or typical use cases.

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/alpacahq/alpaca-mcp-server'

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