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.

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. 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"
      +]
  2. 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}$"
  3. 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."
  4. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare destructiveHint=true, readOnlyHint=false and idempotentHint=true, but the description adds real operational context: the fallback to the default portfolio, that the result names the affected portfolio, that a non-'removed' status is an answer rather than an error, and that transaction-bearing holdings are out of scope. These are behaviors an agent could not infer from 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?

Short, front-loaded sentences with the core action first and edge cases after; nothing is padding. Slightly choppy and a touch repetitive on the 'one ticker / no transactions' boundaries, but efficient overall.

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?

For a destructive, non-idempotent-looking mutation, the description covers trigger conditions, parameter defaulting, failure/status interpretation, and scope exclusions. An output schema exists, so return-shape detail is correctly left out.

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 the schema already documents ticker, exchange, portfolio_id and portfolio_name, including the multi-exchange disambiguation prompt and the default-portfolio fallback. The description restates rather than extends those semantics, so baseline 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?

States a specific verb and resource with explicit scope: 'Remove one company from one of the person's StockLens portfolios' plus 'One ticker per call.' The negative boundary ('It does not trade or delete transactions') separates it from the add_to_watchlist family and from any transaction-editing tool.

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') and an explicit exclusion with a redirect ('A holding with recorded transactions is not removed here; the result says where to do it'). Default-portfolio behavior when portfolio_id/portfolio_name are omitted is also stated.

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