Skip to main content
Glama

confirm_fund_order

Destructive

Confirm a fund order to turn an in-transit order into shares at the pricing day's NAV, updating average cost and leaving cash unchanged.

Instructions

Second leg of an off-exchange fund purchase: turn an in-transit order into shares at the pricing day's NAV (units = (amount - fee) / nav; average cost updates, cash unchanged). The fund_confirm job does this automatically every weekday evening, so call it manually only to supply a NAV / fee yourself or to confirm early.

Safe to call twice: an order that is already confirmed returns {"status": "already_confirmed"} (a cancelled one {"status": "cancelled"}) and nothing changes. If the pricing-day NAV is not published yet the result is {"status": "pending_nav"} and the order stays in transit.

Args: order_id: The order to confirm. nav: Unit NAV; omit to use the published NAV of the pricing day. fee: Subscription fee in CNY (default 0).

Returns: Units added, NAV used and new average cost, or {"status": "error", "error": ...}.

Input Schema

NameRequiredDescriptionDefault
feeNoSubscription fee in CNY, taken out of the order amount (units = (amount - fee) / nav). Default 0.
navNoUnit NAV to confirm at. Omit to fetch the pricing day's published NAV (if it isn't published yet the call returns status 'pending_nav' and changes nothing).
order_idYesorder_id from place_fund_order / status.pending_fund_orders.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.45.1

TDQS

A3.8/5.0
Behavior1/5

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

The description says the tool is 'Safe to call twice' and that an already-confirmed order changes nothing, which is idempotent behavior, but annotations declare `idempotentHint: false`. It also frames the operation as safe/idempotent while `destructiveHint: true`, creating a direct annotation contradiction despite otherwise useful behavioral detail.

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?

Purpose and the automatic-job caveat are front-loaded, and the edge-status details earn their place. However, the Args and Returns blocks duplicate schema/output-schema content, making it slightly longer than necessary.

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 state-changing financial operation, the description covers purpose, manual-use conditions, duplicate-call behavior, pending NAV, fee/NAV semantics, and status returns. An output schema exists, so detailed return-shape explanation is not needed; completeness is strong.

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 schema already documents `order_id`, `nav`, `fee`, defaults, and the pending-NAV behavior. The description's Args section largely restates those fields, adding little beyond the units formula already present in the 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?

Names the exact operation and accounting effect: turning an in-transit fund order into shares at the pricing day's NAV. It clearly positions itself as the second leg after place_fund_order and is distinguishable from place_fund_order and cancel_fund_order.

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

Usage Guidelines5/5

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

Explicitly says the `fund_confirm` job runs automatically every weekday evening and manual calls are only for supplying NAV/fee or confirming early. It also gives conditions for duplicate calls and unpublished NAV.

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