Skip to main content
Glama
meteoroh

tossinvest-mcp

by meteoroh

Modify an open order

tossinvest_modify_order
Destructive

Modify an existing working order's price or quantity (Korean stocks only) to match new terms, with mandatory confirmation for high-value orders.

Instructions

Change the price (and, for Korean stocks, the quantity) of a working order. This alters a REAL order — confirm the new terms with the user first.

Args:

  • order_id (string): the order to modify. Must still be working; get it from tossinvest_list_orders with status='OPEN'.

  • order_type ('LIMIT' | 'MARKET'): the resulting order type.

  • quantity (string, optional): REQUIRED for Korean stocks, whole numbers only. MUST BE OMITTED for US stocks, which reject it with 400 us-modify-quantity-not-supported. US modifications can only change price.

  • price (string, optional): REQUIRED for LIMIT, forbidden for MARKET. Same tick/decimal rules as placing an order.

  • confirm_high_value_order (boolean): default false. Required true at ₩100,000,000 or more. Orders of ₩3,000,000,000 or more are rejected regardless.

  • account_seq (number, optional): resolved automatically for single-account credentials.

  • response_format ('markdown' | 'json'): default 'markdown'.

Returns { accountSeq, orderId, operation: 'modified' }.

Errors: 409 already-filled / already-canceled / already-modified / already-processing, 422 modify-restricted, 404 order-not-found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
priceNoNew limit price. Required for LIMIT, forbidden for MARKET.
order_idYesIdentifier of the working order to modify.
quantityNoNew share count. Required for KR (whole numbers); must be omitted for US.
order_typeYesResulting order type. 'LIMIT' needs `price`; 'MARKET' must omit it.
account_seqNoaccountSeq of the account to act on (the `X-Tossinvest-Account` header). Optional: falls back to TOSSINVEST_ACCOUNT_SEQ, then to the sole account on the credentials. Get valid values from tossinvest_list_accounts.
response_formatNoOutput format: 'markdown' for a compact human-readable summary, 'json' for the complete raw payload.markdown
confirm_high_value_orderNoSet true to acknowledge an order of ₩100,000,000 or more; such orders are rejected with `confirm-high-value-required` otherwise. Only set this after the user has confirmed the amount.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
orderIdYesIdentifier of the resulting order
operationYescreated, modified or canceled
accountSeqYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false; the description adds substantially more: the imperative 'confirm the new terms with the user first,' the US-stock 400 us-modify-quantity-not-supported rejection, and the hard rejection of orders ₩3,000,000,000 or more. Error codes (409 already-filled/already-canceled/already-modified/already-processing, 422 modify-restricted, 404 order-not-found) and the return shape { accountSeq, orderId, operation: 'modified' } give the agent concrete recovery paths.

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?

Front-loaded with the action and the real-order safety warning, followed by scannable Args/Returns/Errors sections. The length is justified for a real-money destructive tool, though the Args section partially duplicates the already-detailed schema descriptions. Every sentence earns its place overall.

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

Completeness5/5

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

For a mutation tool with 7 parameters and real-world consequences, the description covers preconditions, per-market behavior, high-value confirmation flow, return payload, and all documented error paths. The output schema exists, so return values need no further detail. Nothing an agent needs to call it correctly and safely is missing.

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

Parameters4/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 Args section nevertheless adds actionable meaning beyond the schema: the specific 400 error for US quantity, the ₩100M/₩3B thresholds governing confirm_high_value_order, and account_seq auto-resolution for single-account credentials — details that change call construction, not just labeling. It does not fully compensate for everything, but it adds genuine value above an already-rich schema.

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?

Opens with a specific verb+resource statement — "Change the price (and, for Korean stocks, the quantity) of a working order" — that precisely names the action and target. The safety-critical framing "This alters a REAL order" makes it unmistakable that this is a mutating tool, clearly distinct from sibling create/cancel/read tools. The title 'Modify an open order' aligns perfectly with the description.

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?

States the precondition explicitly: the order 'Must still be working; get it from tossinvest_list_orders with status='OPEN'.' This tells the agent how to source a valid order_id and when this tool applies. It does not explicitly name alternatives or exclusions (e.g., 'use tossinvest_cancel_order to remove an order instead'), so it stops short of a 5, but the context is clear.

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