Skip to main content
Glama
longbridge

longbridge

Official

Stock Comparison

valuation_comparison
Read-onlyIdempotent

Compare a stock's valuation against industry peers by entering its symbol. Retrieves the stock's valuation metrics with auto-selected comparable companies for quick benchmarking.

Instructions

Stock valuation comparison. Mode A (single): pass only symbol — server returns stock + auto-selected industry peers.

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.
symbolYesSecurity symbol to compare, e.g. "AAPL.US"
currencyYesCurrency: "USD" | "HKD" | "CNY"
comparison_symbolsNoComparison symbols, comma-separated, max 4, e.g. "MSFT.US,GOOGL.US". Note: pending backend support — currently server auto-selects industry peers.

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": {
      -    "ValuationComparisonHistoryPoint": {
      -      "properties": {
      -        "date": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "pb": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "pe": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "ps": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "ValuationComparisonItem": {
      -      "properties": {
      -        "history": {
      -          "items": {
      -            "$ref": "#/$defs/ValuationComparisonHistoryPoint"
      -          },
      -          "type": [
      -            "array",
      -            "null"
      -          ]
      -        },
      -        "market_value": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "name": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "pb": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "pe": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "price_close": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "ps": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "symbol": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    }
      -  },
      -  "properties": {
      -    "list": {
      -      "items": {
      -        "$ref": "#/$defs/ValuationComparisonItem"
      -      },
      -      "type": [
      -        "array",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  3. Changed1 schema field changedv0.7.1
    • removedInput schema / title
      Removed value: -"ValuationComparisonParam"
  4. Changed18 schema fields changedv0.6.0
    • removedOutput schema / $defs / ValuationComparisonHistoryPoint / description
      Removed value: -"One history point in `valuation_comparison`'s nested `history`.\n\nSubset of documented fields; upstream may return more."
    • removedOutput schema / $defs / ValuationComparisonHistoryPoint / properties / date / description
      Removed value: -"Sample date (RFC3339; rewritten from a unix-epoch field)."
    • removedOutput schema / $defs / ValuationComparisonHistoryPoint / properties / pb / description
      Removed value: -"Price-to-book at this date."
    • removedOutput schema / $defs / ValuationComparisonHistoryPoint / properties / pe / description
      Removed value: -"Price-to-earnings at this date."
    • removedOutput schema / $defs / ValuationComparisonHistoryPoint / properties / ps / description
      Removed value: -"Price-to-sales at this date."
    • removedOutput schema / $defs / ValuationComparisonItem / description
      Removed value: -"One stock in `valuation_comparison`'s `list`.\n\nSubset of documented fields; upstream may return more."
    • removedOutput schema / $defs / ValuationComparisonItem / properties / history / description
      Removed value: -"Per-date valuation history."
    • removedOutput schema / $defs / ValuationComparisonItem / properties / market_value / description
      Removed value: -"Market value."
    • removedOutput schema / $defs / ValuationComparisonItem / properties / name / description
      Removed value: -"Display name."
    • removedOutput schema / $defs / ValuationComparisonItem / properties / pb / description
      Removed value: -"Price-to-book."
    • removedOutput schema / $defs / ValuationComparisonItem / properties / pe / description
      Removed value: -"Price-to-earnings."
    • removedOutput schema / $defs / ValuationComparisonItem / properties / price_close / description
      Removed value: -"Latest close price."
    • removedOutput schema / $defs / ValuationComparisonItem / properties / ps / description
      Removed value: -"Price-to-sales."
    • removedOutput schema / $defs / ValuationComparisonItem / properties / symbol / description
      Removed value: -"Security symbol (transformed from `counter_id`)."
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / description
      Removed value: -"Returned by `valuation_comparison`. Wraps a `list` of compared stocks.\n\nSubset of documented fields; upstream may return more."
    • removedOutput schema / properties / list / description
      Removed value: -"Compared stocks (primary + peers)."
    • removedOutput schema / title
      Removed value: -"ValuationComparisonResponse"
  5. Changed1 schema field changedv0.5.6
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "ValuationComparisonHistoryPoint": {
      +      "description": "One history point in `valuation_comparison`'s nested `history`.\n\nSubset of documented fields; upstream may return more.",
      +      "properties": {
      +        "date": {
      +          "description": "Sample date (RFC3339; rewritten from a unix-epoch field).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "pb": {
      +          "description": "Price-to-book at this date.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "pe": {
      +          "description": "Price-to-earnings at this date.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "ps": {
      +          "description": "Price-to-sales at this date.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "ValuationComparisonItem": {
      +      "description": "One stock in `valuation_comparison`'s `list`.\n\nSubset of documented fields; upstream may return more.",
      +      "properties": {
      +        "history": {
      +          "description": "Per-date valuation history.",
      +          "items": {
      +            "$ref": "#/$defs/ValuationComparisonHistoryPoint"
      +          },
      +          "type": [
      +            "array",
      +            "null"
      +          ]
      +        },
      +        "market_value": {
      +          "description": "Market value.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "description": "Display name.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "pb": {
      +          "description": "Price-to-book.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "pe": {
      +          "description": "Price-to-earnings.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "price_close": {
      +          "description": "Latest close price.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "ps": {
      +          "description": "Price-to-sales.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "symbol": {
      +          "description": "Security symbol (transformed from `counter_id`).",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "description": "Returned by `valuation_comparison`. Wraps a `list` of compared stocks.\n\nSubset of documented fields; upstream may return more.",
      +  "properties": {
      +    "list": {
      +      "description": "Compared stocks (primary + peers).",
      +      "items": {
      +        "$ref": "#/$defs/ValuationComparisonItem"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    }
      +  },
      +  "title": "ValuationComparisonResponse",
      +  "type": "object"
      +}
  6. Addedv0.4.5

TDQS

B3.4/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 fully covered and the burden on the description is lower. The description adds useful behavioral context: auto-selection of industry peers and the note that comparison_symbols is 'pending backend support.' However, it doesn't disclose what happens when comparison_symbols is passed anyway, and 'Mode A' implies undocumented modes without elaboration.

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 two short sentences with no filler, and the core purpose is front-loaded before the Mode A detail. Minor deduction for the cryptic 'Mode A' label, which could be clearer, but overall it is efficient and well-sized for a simple read-only tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter read-only tool with rich annotations and full schema coverage, the description is mostly adequate. Gaps remain: the mode system is only partially documented, behavior when both symbol and comparison_symbols are supplied is ambiguous, and since there is no output schema, the agent would want a stronger hint of the response shape beyond 'stock + auto-selected industry peers.'

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 every parameter (symbol, currency, comparison_symbols, _jq) already has inline documentation with examples and value constraints. The tool description adds little to parameter semantics beyond referencing symbol in Mode A; the baseline 3 applies because the schema carries the heavy lifting.

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 states a specific action and resource ('Stock valuation comparison') and clarifies the return, 'server returns stock + auto-selected industry peers,' which goes beyond the tautological title. The 'Mode A (single)' framing is somewhat cryptic since no other modes are described, but the core purpose is unambiguous and distinguishable from plain 'valuation' siblings.

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 gives an invocation instruction for Mode A ('pass only symbol') and notes that comparison_symbols is pending backend support, which is useful operational context. However, with over 100 siblings including closely related tools like valuation, valuation_rank, industry_valuation, and industry_peers, there is no guidance on when to choose this tool over those alternatives, nor any when-not-to-use exclusions.

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