Skip to main content
Glama
Hamid-K

Avanza-MCP

by Hamid-K

avanza_paper_order_exit

Close an open paper position by position ID or orderbook ID and create a completed paper trade entry. Specify the exit price and reason to keep your paper portfolio accurate.

Instructions

Close an open paper position by position_id or orderbook_id and create a completed paper trade entry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYes
exit_priceYes
session_idNo
exit_reasonNo
position_idNo
orderbook_idNo
tenant_session_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.42

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden and does disclose a meaningful non-obvious side effect: the call creates a completed paper trade entry, not just a position close. But it is silent on whether both identifiers can be supplied, which takes precedence, prerequisites like an existing open position, error behavior, or reversibility.

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?

A single dense sentence with the action front-loaded and zero filler. Every clause earns its place: the verb, the target, the identifier options, and the side effect.

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 mutating financial tool with no annotations, no output schema, and 0% parameter documentation, the description leaves critical gaps: the meaning of exit_price, which identifier to prefer, what the completed trade entry contains, and what happens on failure. It is not complete enough for safe, correct invocation without additional lookup.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/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. It explains only position_id and orderbook_id, while the two required parameters, account_id and exit_price, are entirely unexplained, along with exit_reason, session_id, and tenant_session_id. An agent cannot tell what exit_price represents or why account_id is mandatory.

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 uses a specific verb (close), a precise resource (open paper position), and a stated targeting mechanism (by position_id or orderbook_id), plus a side effect (create a completed paper trade entry). It clearly distinguishes this exit action from siblings like avanza_paper_cancel (cancel) and avanza_order_delete (delete).

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 the use context: it closes an open paper position and offers two identifier paths (position_id or orderbook_id). However, it never explicitly states when to prefer this over alternatives like avanza_paper_cancel, nor does it give exclusions or conditions such as 'only for open paper positions.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools