Skip to main content
Glama

Manawa Terminal

Edit portfolio order

edit_order

Change an open portfolio order. Use this before cancel_order.

Attach or replace the investment case with library_item_id. That is the
document id. search_library returns it as item_id. list_library_items
returns it as id. Pass the id, not the title. An empty library_item_id
removes the case. The accept card and the book show it.

qty, price, expires_kind (day, gtc, or delete_after), expires_at,
after_hours, and library_item_id. Send only the fields that change.
Rules still apply. HIL on,
or an order above Skip HIL up to, opens the accept card again. A day
order needs an open session. A good till that lasts past the next open
can stay open while the session is closed.

Args:
    portfolio_id: The portfolio UUID
    order_id: The order UUID
    qty: New share count
    price: New price, or the new limit
    expires_kind: day, gtc (90 days), or delete_after
    expires_at: Required with delete_after. Naive times are New York.
    after_hours: Extended session for a stock or ETF
    library_item_id: The investment case. The document id from search_library
        (item_id) or list_library_items (id). Not the title. An empty string removes the case.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "portfolio_id": "<portfolio_id>",
      "order_id": "<order_id>"
    },
    "name": "edit_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
qtyNo
priceNo
order_idYes
expires_atNo
after_hoursNo
strategy_idNoStrategy this call belongs to. UUID from list_strategies. The card this call writes keeps that id. Omit when the call is not part of a strategy.
expires_kindNo
portfolio_idYes
library_item_idNoInvestment case to attach or replace. Pass the document id, not the title. search_library returns it as item_id. list_library_items returns it as id. An empty string removes the case.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / strategy_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Strategy this call belongs to. UUID from list_strategies. The card this call writes keeps that id. Omit when the call is not part of a strategy.",
      +  "title": "Strategy Id"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / library_item_id / description
      Added value: +"Investment case to attach or replace. Pass the document id, not the title. search_library returns it as item_id. list_library_items returns it as id. An empty string removes the case."
  3. Changed1 schema field changed
    • addedInput schema / properties / library_item_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Library Item Id"
      +}
  4. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare the generic safety profile (readOnlyHint=false, destructiveHint=false), so the description adds real value: it discloses the HIL/accept-card re-approval trigger, the open-session requirement for day orders, and that GTC orders can persist through a closed session. The phrasing of the approval sentence ('HIL on, or an order above Skip HIL up to, opens the accept card again') is garbled enough to blunt some of that value.

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

Conciseness3/5

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

Purpose and the cancel_order hand-off are front-loaded, but library_item_id is explained twice (body prose plus Args block) and the approval/session sentences are dense and hard to parse. The Args section is worthwhile, yet the prose duplicates it rather than complementing it.

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?

For a 9-parameter mutation with an output schema and safety annotations, the description covers the approval workflow, session constraints, and the tricky parameters. It lacks error/failure behavior when the order is no longer open, which is the main remaining gap.

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

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 22% and expires_kind has no enum in the schema, yet the description enumerates its allowed values (day, gtc, delete_after) with the 90-day GTC meaning, states expires_at is required with delete_after and that naive times are New York, and explains empty-string semantics for library_item_id. This compensates well beyond the structured fields.

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 and resource ('Change an open portfolio order') and names the scope qualifier (open) plus the sibling it precedes (cancel_order). An agent can distinguish this from cancel_order or update_watchlist without opening any schema.

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?

Explicitly routes sequencing: 'Use this before cancel_order.' and instructs 'Send only the fields that change.' However, it never states when NOT to use it (e.g. on filled/closed orders) or what happens if the order is not open, so exclusions are left implicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources