Skip to main content
Glama

Remove from Portfolio

remove_from_watchlist
DestructiveIdempotent

Remove one company from one of the person's StockLens portfolios. Call it only when the person has asked for it. Without portfolio_id or portfolio_name it removes from the default portfolio, and the result names the portfolio. Relay the result's message. A status other than removed is an answer, not an error. A holding with recorded transactions is not removed here; the result says where to do it. One ticker per call. It does not trade or delete transactions.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ticker": "<ticker>"
    },
    "name": "remove_from_watchlist"
  }
}

Input Schema

NameRequiredDescriptionDefault
tickerYesStock ticker symbol (e.g. AAPL). Exactly one ticker per call.
exchangeNoExchange code (e.g. NASDAQ). Optional. When omitted, the ticker is matched against the portfolio; if it is there on more than one exchange you will be asked which.
portfolio_idNoThe id of the portfolio to remove from, as get_portfolio_insights lists it. Optional: without it or portfolio_name the default portfolio is used.
portfolio_nameNoThe name of the portfolio to remove from, as the person names it (exact, case does not matter). Optional.

Output Schema

NameRequiredDescriptionDefault
modeNo
scopeYes
statusYes
tickerNo
messageYes
exchangeNo
next_stepNo
is_defaultNo
portfoliosNo
portfolio_idNo
company_countNo
portfolio_nameNo
portfolio_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedOutput schema / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / next_step / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / next_step / properties / arguments / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / portfolios / items / additionalProperties
      Removed value: -false
  2. Changed15 schema fields changed
    • addedInput schema / properties / portfolio_id
      Added value: +{
      +  "description": "The id of the portfolio to remove from, as get_portfolio_insights lists it. Optional: without it or portfolio_name the default portfolio is used.",
      +  "type": "string"
      +}
    • addedInput schema / properties / portfolio_name
      Added value: +{
      +  "description": "The name of the portfolio to remove from, as the person names it (exact, case does not matter). Optional.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / company_count
      Added value: +{
      +  "type": [
      +    "null",
      +    "integer"
      +  ]
      +}
    • addedOutput schema / properties / is_default
      Added value: +{
      +  "type": [
      +    "null",
      +    "boolean"
      +  ]
      +}
    • addedOutput schema / properties / message
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / mode
      Added value: +{
      +  "enum": [
      +    "holding",
      +    "watching"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / next_step
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "arguments": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "exchange": {
      +          "type": "string"
      +        },
      +        "ticker": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "ticker"
      +      ],
      +      "type": [
      +        "null",
      +        "object"
      +      ]
      +    },
      +    "description": {
      +      "type": "string"
      +    },
      +    "kind": {
      +      "enum": [
      +        "call_tool",
      +        "ask_user",
      +        "human_action"
      +      ],
      +      "type": "string"
      +    },
      +    "options": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "tool": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "kind"
      +  ],
      +  "type": [
      +    "null",
      +    "object"
      +  ]
      +}
    • addedOutput schema / properties / portfolio_count
      Added value: +{
      +  "type": [
      +    "null",
      +    "integer"
      +  ]
      +}
    • addedOutput schema / properties / portfolio_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / portfolio_name
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / portfolios
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "company_count": {
      +        "type": "integer"
      +      },
      +      "is_default": {
      +        "type": "boolean"
      +      },
      +      "portfolio_id": {
      +        "type": "string"
      +      },
      +      "portfolio_name": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "portfolio_id",
      +      "portfolio_name",
      +      "is_default",
      +      "company_count"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • removedOutput schema / properties / removed
      Removed value: -{
      -  "type": "boolean"
      -}
    • addedOutput schema / properties / status
      Added value: +{
      +  "enum": [
      +    "removed",
      +    "not_in_portfolio",
      +    "has_transactions",
      +    "ambiguous_listing",
      +    "portfolio_not_found"
      +  ],
      +  "type": "string"
      +}
    • removedOutput schema / properties / total_holdings
      Removed value: -{
      -  "type": "integer"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "ticker",
      -  "exchange",
      -  "removed",
      -  "total_holdings",
      -  "scope"
      -]New value: +[
      +  "status",
      +  "message",
      +  "scope"
      +]
  3. Changed1 schema field changed
    • changedInput schema / properties / ticker / pattern
      Previous value: -"^[A-Za-z][A-Za-z.\\-]{0,9}$"New value: +"^[A-Za-z0-9][A-Za-z0-9.\\-]{0,19}$"
  4. Changed3 schema fields changed
    • changedInput schema / properties / exchange / description
      Previous value: -"Exchange code (e.g. NASDAQ). Optional — when omitted, the ticker is matched against your own watchlist; if it is tracked on more than one exchange you will be asked which one."New value: +"Exchange code (e.g. NASDAQ). Optional. When omitted, the ticker is matched against the portfolio; if it is there on more than one exchange you will be asked which."
    • addedInput schema / properties / exchange / enum
      Added value: +[
      +  "NYSE",
      +  "NASDAQ",
      +  "AMEX",
      +  "OTC",
      +  "CBOE",
      +  "TSX",
      +  "TSXV",
      +  "CNQ",
      +  "NEO",
      +  "MEX",
      +  "B3",
      +  "SANTIAGO",
      +  "BUE",
      +  "BVC",
      +  "LSE",
      +  "EURONEXT_PARIS",
      +  "EURONEXT_AMSTERDAM",
      +  "EURONEXT_BRUSSELS",
      +  "EURONEXT_LISBON",
      +  "EURONEXT_DUBLIN",
      +  "XETRA",
      +  "SIX",
      +  "BME",
      +  "MILAN",
      +  "OSLO",
      +  "OMX_STOCKHOLM",
      +  "OMX_HELSINKI",
      +  "OMX_COPENHAGEN",
      +  "WSE",
      +  "VIE",
      +  "ATH",
      +  "PRA",
      +  "BUD",
      +  "IST",
      +  "ICE",
      +  "RIS",
      +  "TAL",
      +  "MCX",
      +  "TSE",
      +  "HKEX",
      +  "SHANGHAI",
      +  "SHENZHEN",
      +  "ASX",
      +  "TWSE",
      +  "SGX",
      +  "NSE",
      +  "KRX",
      +  "BSE",
      +  "KOE",
      +  "JKT",
      +  "KLS",
      +  "SET",
      +  "NZE",
      +  "HOSE",
      +  "TWO",
      +  "TADAWUL",
      +  "JSE",
      +  "TLV",
      +  "DFM",
      +  "EGX",
      +  "DOH",
      +  "KUW"
      +]
    • changedInput schema / properties / ticker / description
      Previous value: -"Stock ticker symbol to remove from the watchlist (e.g. AAPL). Exactly one ticker per call."New value: +"Stock ticker symbol (e.g. AAPL). Exactly one ticker per call."
  5. Added

TDQS

A4.9/5.0
Behavior5/5

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

Goes well past the annotations by disclosing the default-portfolio fallback when neither portfolio_id nor portfolio_name is given, that the result names the portfolio, that a non-removed status is a valid answer rather than an error, and that transaction-bearing holdings are rejected with guidance. These are behavioral facts an agent cannot derive from destructiveHint/idempotentHint alone.

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?

Short declarative sentences, front-loaded with the action and the permission gate, followed by edge-case handling. No filler and nothing repeated.

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

Completeness5/5

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

An output schema exists, yet the description still tells the agent how to interpret statuses and messages, which is the part that matters for a destructive mutation. Combined with the fallback and restriction notes, nothing needed to call it correctly is missing.

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%, so the baseline is 3; the description adds a little by clarifying the optional-portfolio default and enforcing one ticker per call. Most of that overlaps the schema's own parameter descriptions, so the gain over structured data is modest.

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?

States a specific verb and resource with scope: "Remove one company from one of the person's StockLens portfolios." The singular-per-call constraint ("One ticker per call") and the sibling framing against add_to_watchlist make the operation unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit gating condition ("Call it only when the person has asked for it"), a when-not case (holdings with recorded transactions are not removed here), and a redirect to wherever the result says to do it. It also rules out adjacent actions ("does not trade or delete transactions").

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources