Skip to main content
Glama
bartest5

Alpaca MCP Server

by bartest5

close_position

Place a sell order to liquidate a position for a single symbol. Choose quantity or percentage, and orders queue until the next market open if the market is closed.

Instructions

Closes a specific position for a single symbol by placing a sell order. If the market is closed, the sell order will remain queued and execute at the next market open.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qtyNothe number of shares to liquidate. Can accept up to 9 decimal points. Cannot work with percentage
percentageNopercentage of position to liquidate. Must be between 0 and 100. Would only sell fractional if position is originally fractional. Can accept up to 9 decimal points. Cannot work with qty
symbol_or_asset_idYessymbol or assetId

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively discloses that the tool places a sell order and that if the market is closed, the order queues and executes at the next open. This exceeds minimal coverage, though it could mention order type or default full-close behavior.

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 two concise sentences, front-loaded with the primary action and followed by an important behavioral note. Every sentence provides value without 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?

Given the tool's moderate complexity, the description covers the core purpose and the notable queued-order behavior. An output schema exists, so return values need not be described. It lacks explicit mention that omitting qty/percentage closes the entire position, but the title and description imply a full close.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds no additional parameter semantics beyond the schema, such as the default behavior when neither qty nor percentage is provided, which would be valuable but is not present.

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 action: 'Closes a specific position for a single symbol by placing a sell order.' The verb 'closes' and the resource 'position' are specific, and 'for a single symbol' distinguishes it from sibling tools like close_all_positions.

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

Usage Guidelines3/5

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

The description implies usage for a single position, contrasting with close_all_positions, but does not explicitly state when to use this tool over alternatives or provide exclusions. The queued order behavior is a usability note, not a direct alternative comparison.

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