Skip to main content
Glama
longbridge

longbridge

Official

IPO Profit / Loss

ipo_profit_loss
Read-onlyIdempotent

Check IPO profit and loss with a summary and per-stock breakdown. Filter by all time, year-to-date, 1 year, or 3 years to analyze performance.

Instructions

Show IPO profit/loss summary and per-stock breakdown. period: all/ytd/1y/3y.

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.
pageNoPage number (default: 1)
sizeNoPage size (default: 20)
periodNoPeriod filter: "all", "ytd", "1y", "3y" (default: "all")

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields 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."
    • removedInput schema / properties / page / format
      Removed value: -"uint32"
    • removedInput schema / properties / size / format
      Removed value: -"uint32"
  2. Changed2 schema fields changedv0.10.6
    • addedInput schema / properties / _jq
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "$defs": {
      -    "IpoProfitLossItem": {
      -      "properties": {
      -        "cost": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "current_value": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "return_rate": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "symbol": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "IpoProfitLossItems": {
      -      "properties": {
      -        "items": {
      -          "items": {
      -            "$ref": "#/$defs/IpoProfitLossItem"
      -          },
      -          "type": [
      -            "array",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "IpoProfitLossSummary": {
      -      "properties": {
      -        "total_cost": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "total_return": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "total_value": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    }
      -  },
      -  "properties": {
      -    "items": {
      -      "$ref": "#/$defs/IpoProfitLossItems"
      -    },
      -    "summary": {
      -      "$ref": "#/$defs/IpoProfitLossSummary"
      -    }
      -  },
      -  "required": [
      -    "summary",
      -    "items"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. Changed1 schema field changedv0.7.1
    • removedInput schema / title
      Removed value: -"IpoProfitLossParam"
  4. Changed16 schema fields changedv0.6.0
    • removedOutput schema / $defs / IpoProfitLossItem / description
      Removed value: -"A single per-stock IPO profit/loss breakdown item. Subset of upstream\nfields; monetary and rate fields are stringified by the transform pipeline."
    • removedOutput schema / $defs / IpoProfitLossItem / properties / cost / description
      Removed value: -"Cost basis for this stock (stringified decimal)."
    • removedOutput schema / $defs / IpoProfitLossItem / properties / current_value / description
      Removed value: -"Current market value for this stock (stringified decimal)."
    • removedOutput schema / $defs / IpoProfitLossItem / properties / return_rate / description
      Removed value: -"Return rate for this stock (stringified decimal / percentage)."
    • removedOutput schema / $defs / IpoProfitLossItem / properties / symbol / description
      Removed value: -"Security symbol, e.g. \"6871.HK\"."
    • removedOutput schema / $defs / IpoProfitLossItems / description
      Removed value: -"The items side of the IPO profit/loss feed. The documented portion is\n`items[]`."
    • removedOutput schema / $defs / IpoProfitLossItems / properties / items / description
      Removed value: -"Per-stock profit/loss breakdown entries."
    • removedOutput schema / $defs / IpoProfitLossSummary / description
      Removed value: -"The summary side of the IPO profit/loss feed. Documented totals are\nstringified decimals."
    • removedOutput schema / $defs / IpoProfitLossSummary / properties / total_cost / description
      Removed value: -"Total cost across all IPO holdings (stringified decimal)."
    • removedOutput schema / $defs / IpoProfitLossSummary / properties / total_return / description
      Removed value: -"Total return across all IPO holdings (stringified decimal)."
    • removedOutput schema / $defs / IpoProfitLossSummary / properties / total_value / description
      Removed value: -"Total current value across all IPO holdings (stringified decimal)."
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / description
      Removed value: -"Returned by `ipo_profit_loss`. Summary and per-stock breakdown combined\nunder a `{summary, items}` wrapper object built by the tool."
    • removedOutput schema / properties / items / description
      Removed value: -"Per-stock breakdown items."
    • removedOutput schema / properties / summary / description
      Removed value: -"Aggregate cost/value/return totals."
    • removedOutput schema / title
      Removed value: -"IpoProfitLossResponse"
  5. Changed1 schema field changedv0.5.6
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "IpoProfitLossItem": {
      +      "description": "A single per-stock IPO profit/loss breakdown item. Subset of upstream\nfields; monetary and rate fields are stringified by the transform pipeline.",
      +      "properties": {
      +        "cost": {
      +          "description": "Cost basis for this stock (stringified decimal).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "current_value": {
      +          "description": "Current market value for this stock (stringified decimal).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "return_rate": {
      +          "description": "Return rate for this stock (stringified decimal / percentage).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "symbol": {
      +          "description": "Security symbol, e.g. \"6871.HK\".",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "IpoProfitLossItems": {
      +      "description": "The items side of the IPO profit/loss feed. The documented portion is\n`items[]`.",
      +      "properties": {
      +        "items": {
      +          "description": "Per-stock profit/loss breakdown entries.",
      +          "items": {
      +            "$ref": "#/$defs/IpoProfitLossItem"
      +          },
      +          "type": [
      +            "array",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "IpoProfitLossSummary": {
      +      "description": "The summary side of the IPO profit/loss feed. Documented totals are\nstringified decimals.",
      +      "properties": {
      +        "total_cost": {
      +          "description": "Total cost across all IPO holdings (stringified decimal).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "total_return": {
      +          "description": "Total return across all IPO holdings (stringified decimal).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "total_value": {
      +          "description": "Total current value across all IPO holdings (stringified decimal).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "description": "Returned by `ipo_profit_loss`. Summary and per-stock breakdown combined\nunder a `{summary, items}` wrapper object built by the tool.",
      +  "properties": {
      +    "items": {
      +      "$ref": "#/$defs/IpoProfitLossItems",
      +      "description": "Per-stock breakdown items."
      +    },
      +    "summary": {
      +      "$ref": "#/$defs/IpoProfitLossSummary",
      +      "description": "Aggregate cost/value/return totals."
      +    }
      +  },
      +  "required": [
      +    "summary",
      +    "items"
      +  ],
      +  "title": "IpoProfitLossResponse",
      +  "type": "object"
      +}
  6. Addedv0.4.5
  7. Removedv0.4.0
  8. Addedv0.3.2
  9. Removedv0.3.1
  10. Addedv0.2.1

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds that the result includes a summary and per-stock breakdown, but it does not disclose pagination behavior, data source, or any operational caveats. This is acceptable but not enriching beyond the annotations.

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?

The description is short, front-loaded with the core purpose, and free of fluff. However, the second sentence restates period options already present in the schema, so not every word earns its place, though it remains 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 summary tool, this is mostly complete: all parameters are documented in the schema, annotations cover safety, and the description states the high-level output shape. The main gap is the lack of relationship to sibling IPO/analysis tools, but that is not fatal for correct invocation.

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%, with _jq, page, size, and period already documented including defaults. The description only repeats the period enum values ('all/ytd/1y/3y') and adds no new semantic meaning, so the baseline of 3 applies.

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?

The description uses a specific verb ('Show') plus a resource ('IPO profit/loss') and states the scope ('summary and per-stock breakdown'). It is clearly distinct from siblings like ipo_orders, ipo_calendar, and profit_analysis because the profit/loss focus is explicit.

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 this is a read-only query tool for IPO P/L, but it does not state when to prefer it over alternatives such as ipo_orders or profit_analysis, nor does it give any when-not-to-use guidance. The usage context is inferred rather than explicit.

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