Skip to main content
Glama
longbridge

longbridge

Official

Stock Positions

stock_positions
Read-onlyIdempotent

Get current stock positions across all channels. For US accounts, includes an asset overview with cash, stock, option, crypto lists, and buying power.

Instructions

Get current stock positions across all channels. US accounts only: an additional us_asset_overview field {cash_list, stock_list, option_list, crypto_list, cash_buy_power, overnight_buy_power} is included alongside the existing data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
_jqNoOptional jq filter (jaq syntax) applied to this tool's JSON response before it is returned; it never changes the upstream request. One output is returned as-is, several as a JSON array, none as []. Module imports and the `env`/`debug`/`stderr` builtins are unavailable. Example: .data | map({symbol}). Omit for the full response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.12.0
    • addedInput schema / properties / _jq / description
      Added value: +"Optional jq filter (jaq syntax) applied to this tool's JSON response before it is returned; it never changes the upstream request. One output is returned as-is, several as a JSON array, none as []. Module imports and the `env`/`debug`/`stderr` builtins are unavailable. Example: .data | map({symbol}). Omit for the full response."
  2. Changed2 schema fields changedv0.10.6
    • addedInput schema / properties / _jq
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "$defs": {
      -    "StockPosition": {
      -      "properties": {
      -        "available_quantity": {
      -          "type": "string"
      -        },
      -        "cost_price": {
      -          "type": "string"
      -        },
      -        "currency": {
      -          "type": "string"
      -        },
      -        "init_quantity": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "market": {
      -          "type": "string"
      -        },
      -        "quantity": {
      -          "type": "string"
      -        },
      -        "symbol": {
      -          "type": "string"
      -        },
      -        "symbol_name": {
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "symbol",
      -        "symbol_name",
      -        "quantity",
      -        "available_quantity",
      -        "currency",
      -        "cost_price",
      -        "market"
      -      ],
      -      "type": "object"
      -    },
      -    "StockPositionChannel": {
      -      "properties": {
      -        "account_channel": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "stock_info": {
      -          "items": {
      -            "$ref": "#/$defs/StockPosition"
      -          },
      -          "type": "array"
      -        }
      -      },
      -      "required": [
      -        "stock_info"
      -      ],
      -      "type": "object"
      -    },
      -    "UsAssetOverview": {
      -      "properties": {
      -        "account_type": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "cash_buy_power": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "cash_list": {
      -          "items": {
      -            "$ref": "#/$defs/UsCashPosition"
      -          },
      -          "type": [
      -            "array",
      -            "null"
      -          ]
      -        },
      -        "crypto_list": {
      -          "items": {
      -            "$ref": "#/$defs/UsCryptoPosition"
      -          },
      -          "type": [
      -            "array",
      -            "null"
      -          ]
      -        },
      -        "currency": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "multi_leg": {},
      -        "option_list": {
      -          "items": {
      -            "$ref": "#/$defs/UsOptionPosition"
      -          },
      -          "type": [
      -            "array",
      -            "null"
      -          ]
      -        },
      -        "overnight_buy_power": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "stock_list": {
      -          "items": {
      -            "$ref": "#/$defs/UsStockPosition"
      -          },
      -          "type": [
      -            "array",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "UsCashPosition": {
      -      "properties": {
      -        "currency": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "frozen_buy_cash": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "outstanding": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "settled_cash": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "total_amount": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "total_cash": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "UsCryptoPosition": {
      -      "properties": {
      -        "average_cost": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "currency": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "symbol": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "UsOptionPosition": {
      -      "properties": {
      -        "average_cost": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "currency": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "due_date": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "market_price": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "name": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "position_side": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "quantity": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "strike_price": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "symbol": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "today_pl": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "type": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "underlying_code": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "UsStockPosition": {
      -      "properties": {
      -        "average_cost": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "currency": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "industry_name": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "last_done": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "market": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "market_price": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "name": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "position_side": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "prev_close": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "quantity": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "symbol": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "today_pl": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    }
      -  },
      -  "properties": {
      -    "list": {
      -      "items": {
      -        "$ref": "#/$defs/StockPositionChannel"
      -      },
      -      "type": "array"
      -    },
      -    "us_asset_overview": {
      -      "anyOf": [
      -        {
      -          "$ref": "#/$defs/UsAssetOverview"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "warnings": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": [
      -        "array",
      -        "null"
      -      ]
      -    }
      -  },
      -  "required": [
      -    "list"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. Changed1 schema field changedv0.10.2
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
  4. Changed6 schema fields changedv0.8.4
    • addedOutput schema / $defs / UsAssetOverview
      Added value: +{
      +  "properties": {
      +    "account_type": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "cash_buy_power": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "cash_list": {
      +      "items": {
      +        "$ref": "#/$defs/UsCashPosition"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "crypto_list": {
      +      "items": {
      +        "$ref": "#/$defs/UsCryptoPosition"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "currency": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "multi_leg": {},
      +    "option_list": {
      +      "items": {
      +        "$ref": "#/$defs/UsOptionPosition"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "overnight_buy_power": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "stock_list": {
      +      "items": {
      +        "$ref": "#/$defs/UsStockPosition"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / $defs / UsCashPosition
      Added value: +{
      +  "properties": {
      +    "currency": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "frozen_buy_cash": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "outstanding": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "settled_cash": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "total_amount": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "total_cash": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / $defs / UsCryptoPosition
      Added value: +{
      +  "properties": {
      +    "average_cost": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "currency": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "symbol": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / $defs / UsOptionPosition
      Added value: +{
      +  "properties": {
      +    "average_cost": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "currency": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "due_date": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "market_price": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "name": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "position_side": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "quantity": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "strike_price": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "symbol": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "today_pl": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "type": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "underlying_code": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / $defs / UsStockPosition
      Added value: +{
      +  "properties": {
      +    "average_cost": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "currency": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "industry_name": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "last_done": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "market": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "market_price": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "name": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "position_side": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "prev_close": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "quantity": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "symbol": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "today_pl": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / us_asset_overview
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/UsAssetOverview"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  5. Changed14 schema fields changedv0.6.0
    • removedOutput schema / $defs / StockPosition / properties / available_quantity / description
      Removed value: -"Quantity available to sell (excludes locked / pending)."
    • removedOutput schema / $defs / StockPosition / properties / cost_price / description
      Removed value: -"Cost price (per the client's choice of average or diluted cost)."
    • removedOutput schema / $defs / StockPosition / properties / currency / description
      Removed value: -"Settlement currency, e.g. \"USD\" / \"HKD\"."
    • removedOutput schema / $defs / StockPosition / properties / init_quantity / description
      Removed value: -"Holding quantity at market open (pre-market baseline)."
    • removedOutput schema / $defs / StockPosition / properties / market / description
      Removed value: -"Market code, e.g. \"US\" / \"HK\"."
    • removedOutput schema / $defs / StockPosition / properties / quantity / description
      Removed value: -"Total holding quantity."
    • removedOutput schema / $defs / StockPosition / properties / symbol / description
      Removed value: -"Security symbol, e.g. \"700.HK\"."
    • removedOutput schema / $defs / StockPosition / properties / symbol_name / description
      Removed value: -"Display name of the security."
    • removedOutput schema / $defs / StockPositionChannel / properties / account_channel / description
      Removed value: -"Broker channel identifier. Always emitted as `null` for privacy."
    • removedOutput schema / $defs / StockPositionChannel / properties / stock_info / description
      Removed value: -"Stock positions held in this channel."
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / description
      Removed value: -"Returned by `stock_positions`. Top-level wraps a `list` array\n(one entry per linked broker channel), each carrying its own positions."
    • removedOutput schema / properties / list / description
      Removed value: -"Position channels — one entry per broker channel."
    • removedOutput schema / title
      Removed value: -"StockPositionsResponse"
  6. Addedv0.4.5
  7. Removedv0.4.0
  8. Addedv0.3.2
  9. Removedv0.3.1
  10. First observedv0.1.12

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare this as a safe, read-only, idempotent operation, so the description does not need to restate that. It does add useful behavioral context by disclosing the US-only us_asset_overview field and its subfields, but it says nothing about response shape, errors, or other edge-case behavior.

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 two concise sentences with no filler. The main purpose is front-loaded, and the US-account-specific caveat is placed second, making the structure clear and efficient.

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 simple, read-only, parameterless tool, the description covers the core purpose, scope, and the notable US-only response addition. The absence of an output schema is partly mitigated by the tool's name and the explicit field detail, though a bit more detail about the base response structure would make it fully complete.

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?

The only parameter, _jq, is fully documented in the input schema with syntax and behavior details. Since schema description coverage is 100%, the description does not need to add parameter information; it simply stays silent, which is acceptable.

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 a specific action ('Get current stock positions') and resource scope ('across all channels'). It is easy to understand what the tool returns, but it does not explicitly differentiate from sibling tools like fund_positions or short_positions, so it misses the top score.

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 phrase 'current stock positions' implies when to use the tool, and the US-account caveat adds a relevant condition. However, there is no explicit guidance on when not to use it or which sibling tools cover alternatives such as fund positions or short positions.

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

Deploy Server

Other Tools