Skip to main content
Glama
longbridge

longbridge

Official

Replace Grid Order

grid_replace
DestructiveIdempotent

Replace an existing grid order's entire rule using its order ID. Update any grid parameters by providing the order ID and new rule fields.

Instructions

Replace an existing grid order's rule by order_id. Accepts the same grid rule fields as grid_submit. Overwrites the order's entire rule.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rthNoRegular-trading-hours flag: 0 / 1 / 2.
order_idYesGrid order ID to replace.
expire_timeNoExpiry time in unix seconds (use with GTD).
time_in_forceNoTime in force: 0 = Day, 1 = GTC, 6 = GTD.
multiple_triggerNoWhether one grid level may trigger multiple times.
trigger_quantityNoQuantity per trigger (decimal string).
lower_limit_eventNoAction at lower bound: 1 = ignore (keep running), 2 = close at last price.
lower_limit_priceNoLower price bound (decimal string).
support_shortsellNoWhether short selling is allowed.
trigger_buy_depthNoBuy-side order-book depth (-5..5; 0 = use grid_order_type_down).
trigger_spread_upNoUpward trigger spread, absolute (decimal string; use with type 1).
upper_limit_eventNoAction at upper bound: 1 = ignore (keep running), 2 = close at last price.
upper_limit_priceNoUpper price bound (decimal string).
grid_order_type_upNoSell-side order type when depth is 0: GMO / GLO / GTG.
trigger_percent_upNoUpward trigger percent (decimal string; use with type 2).
trigger_price_typeNoTrigger price type: 1 = spread (absolute), 2 = percent.
trigger_sell_depthNoSell-side order-book depth (-5..5; 0 = use grid_order_type_up).
trigger_spread_downNoDownward trigger spread, absolute (decimal string; use with type 1).
grid_order_type_downNoBuy-side order type when depth is 0: GMO / GLO / GTG.
lower_limit_quantityNoQuantity handled when the lower bound is reached (decimal string).
submitted_base_priceNoBase price the grid is anchored to (decimal string).
trigger_percent_downNoDownward trigger percent (decimal string; use with type 2).
upper_limit_quantityNoQuantity handled when the upper bound is reached (decimal string).
Behavior4/5

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

Annotations include destructiveHint=true, idempotentHint=true, and openWorldHint=true. The description does not contradict these, and it adds value by stating that the operation overwrites the entire existing rule, which is critical behavioral detail not fully captured by annotations. No contradictions found.

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 concise, two sentences, and front-loads the core purpose and key behavior (overwrites entire rule). No fluff, every word adds value.

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?

Despite lacking an output schema, the description is adequate for a mutation tool with a clear effect (replacing a rule). It does not explain return values or side effects (e.g., whether old rule is deleted), but the key behavior is covered. For a complex tool with 23 parameters, it could benefit from noting that all fields are optional except order_id and how omitted fields are treated.

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 100% for all 23 parameters, so the description does not add much beyond the schema. However, it does note that it accepts the same fields as grid_submit, which helps an agent understand parameter reuse. But it does not compensate for the low description coverage on parameter usage specifics (e.g., which fields are required for a valid replacement).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool replaces an existing grid order's rule by order_id, and that it overwrites the entire rule. However, it does not explicitly differentiate from sibling tools like grid_submit, grid_cancel, or grid_update, though the phrase 'overwrites the entire rule' hints at a key distinction.

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 replacing an existing grid order, but it does not explicitly state when to use this over grid_submit (e.g., for modifications) or when not to use it. No alternatives or exclusions are mentioned, so guidance is only implied.

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/longbridge/longbridge-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server