Skip to main content
Glama
bartest5

Alpaca MCP Server

by bartest5

close_all_positions

Liquidate all open positions by placing sell orders for each. If the market is closed, orders queue and execute at the next open. Optionally cancel existing orders first.

Instructions

Closes all open positions by placing sell orders for each. If the market is closed, the sell orders will remain queued and execute at the next market open.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cancel_ordersNoIf true is specified, cancel all open orders before liquidating all positions.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

There are no annotations, so the description carries the full burden. It discloses an important behavioral trait: sell orders remain queued when the market is closed and execute later. However, it does not mention the optional cancellation of existing orders, potential partial failures, or reversibility, which are significant for a mutation tool.

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

Conciseness5/5

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

The description is concise and front-loaded: two sentences, the first stating the main action, the second adding a valuable edge-case caveat. No unnecessary words or redundancy.

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

Completeness4/5

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

The tool is simple with one optional parameter and an output schema. The description covers the core function and a key market-closed behavior, which is sufficient for most use cases. It could mention more about order types or failure modes, but overall it is reasonably complete.

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 input schema fully describes the only parameter 'cancel_orders' with a clear conditional description. Schema coverage is 100%, so the description does not need to add parameter details; a baseline score of 3 is appropriate.

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

Purpose5/5

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

The description clearly states the tool's action and scope: 'Closes all open positions by placing sell orders for each.' This is specific and distinguishes it from the sibling 'close_position' which presumably targets a single position.

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

Usage Guidelines4/5

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

The description provides clear context that this tool is for liquidating all open positions, which differentiates it from single-position tools. However, it does not explicitly mention alternatives or when not to use it, though the context is strong enough to infer usage.

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/bartest5/alpacahq_alpaca-mcp-server'

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