Skip to main content
Glama
longbridge

longbridge

Official

Estimate Max Purchase Quantity

estimate_max_purchase_quantity
Read-onlyIdempotent

Estimate the maximum buy or sell quantity for a security, returning cash and margin limits to enable informed order placement.

Instructions

Estimate maximum buy/sell quantity for a symbol. Returns {cash_max_qty, margin_max_qty} (decimal strings). Only symbol is required; side (case-insensitive Buy/Sell) defaults to Buy, order_type (case-insensitive) defaults to LO, and price is optional.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesSecurity symbol, e.g. "700.HK"
sideNoBuy or Sell (case-insensitive; default: Buy)Buy
order_typeNoOrder type, case-insensitive (default: LO): LO (Limit Order) / ELO (Enhanced Limit Order) / MO (Market Order) / AO (At-auction) / ALO (At-auction Limit Order)LO
priceNoLimit price for limit-style orders. Omit for market orders.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cash_max_qtyYesMaximum buy/sell quantity using cash buying power.
margin_max_qtyYesMaximum buy/sell quantity using margin buying power.
Behavior3/5

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

Annotations already declare readOnlyHint, destructiveHint=false, idempotentHint=true, so description adds limited behavioral insight beyond that. Mentions return format (decimal strings) and case-insensitivity, but no additional side effects or limitations.

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?

Two sentences: first states purpose and return format, second covers parameter guidance. No unnecessary words; all information is front-loaded and relevant.

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?

Covers purpose, parameters, and return format briefly. With output schema available (but not shown), the description's output indication is sufficient. Could mention that order_type and price affect the estimate, but overall complete for a simple estimation tool.

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 coverage is 100%, but description adds value by stating defaults (side defaults to Buy, order_type to LO), case-insensitivity, and optional nature of price. This clarifies usage beyond schema, which only lists defaults without case-insensitivity.

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?

Clearly states the verb 'Estimate' and resource 'maximum buy/sell quantity for a symbol'. Distinguishes itself from sibling order-related tools (e.g., submit_order) by focusing on estimation of max quantity, not execution.

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?

Provides basic parameter guidance (only symbol required, defaults, case-insensitivity) but lacks explicit when-to-use vs. alternatives (e.g., when planning an order vs. submitting one). Implied context but no exclusions.

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