Skip to main content
Glama

Add to Portfolio

add_to_watchlist

Add one company to one of the person's StockLens portfolios as a company they follow, so its score stays readable here. Call it only when the person has asked for it, or agreed to an offer a StockLens result supplied in next_step; a yes to an offer you composed yourself is not agreement. Without portfolio_id or portfolio_name it adds to the default portfolio, and the result names the portfolio that received it. Relay the result's message, which says where the company went. A status other than added is an answer, not an error: relay its message and act on next_step. After an add the person accepted from a get_market_summary offer, call get_market_summary again to answer their question. One ticker per call; for a list of companies, use add_to_watchlist_batch. It does not trade, record a holding or move money.

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": "add_to_watchlist"
  }
}

Input Schema

NameRequiredDescriptionDefault
tickerYesStock ticker symbol (e.g. AAPL). Exactly one ticker per call.
exchangeNoExchange code (e.g. NASDAQ). Optional. Resolved automatically if omitted.
portfolio_idNoThe id of the portfolio to add to, as get_portfolio_insights lists it. Optional: without it or portfolio_name the company goes to the default portfolio.
portfolio_nameNoThe name of the portfolio to add to, as the person names it (exact, case does not matter). Optional.

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedOutput schema / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / candidates / items / 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. Changed1 schema field changed
    • changedOutput schema / properties / status / enum
      Previous value: -[
      -  "added",
      -  "already_in_portfolio",
      -  "over_capacity",
      -  "ambiguous",
      -  "not_found",
      -  "portfolio_not_found"
      -]New value: +[
      +  "added",
      +  "already_in_portfolio",
      +  "over_capacity",
      +  "ambiguous",
      +  "not_found",
      +  "not_covered",
      +  "portfolio_not_found"
      +]
  3. Changed1 schema field changed
    • addedOutput schema / properties / candidates / items / properties / scored
      Added value: +{
      +  "type": [
      +    "null",
      +    "boolean"
      +  ]
      +}
  4. Changed15 schema fields changed
    • addedInput schema / properties / portfolio_id
      Added value: +{
      +  "description": "The id of the portfolio to add to, as get_portfolio_insights lists it. Optional: without it or portfolio_name the company goes to the default portfolio.",
      +  "type": "string"
      +}
    • addedInput schema / properties / portfolio_name
      Added value: +{
      +  "description": "The name of the portfolio to add to, as the person names it (exact, case does not matter). Optional.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / candidates
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "company_name": {
      +        "type": "string"
      +      },
      +      "exchange": {
      +        "type": "string"
      +      },
      +      "ticker": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "ticker",
      +      "exchange",
      +      "company_name"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • 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"
      +  ]
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "enum": [
      +    "added",
      +    "already_in_portfolio",
      +    "over_capacity",
      +    "ambiguous",
      +    "not_found",
      +    "portfolio_not_found"
      +  ],
      +  "type": "string"
      +}
    • removedOutput schema / properties / total_holdings
      Removed value: -{
      -  "type": "integer"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "ticker",
      -  "exchange",
      -  "total_holdings",
      -  "plan_limit",
      -  "scope"
      -]New value: +[
      +  "status",
      +  "message",
      +  "scope"
      +]
  5. 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}$"
  6. Changed3 schema fields changed
    • changedInput schema / properties / exchange / description
      Previous value: -"Exchange code (e.g. NASDAQ). Optional - resolved automatically if omitted."New value: +"Exchange code (e.g. NASDAQ). Optional. Resolved automatically if omitted."
    • 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 add to the watchlist (e.g. AAPL). Exactly one ticker per call."New value: +"Stock ticker symbol (e.g. AAPL). Exactly one ticker per call."
  7. Changed1 schema field changed
    • changedInput schema / properties / exchange / description
      Previous value: -"Exchange code (e.g. NASDAQ). Optional — auto-resolved via StockLens autocomplete if omitted."New value: +"Exchange code (e.g. NASDAQ). Optional - resolved automatically if omitted."
  8. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false, idempotentHint=false), it discloses the default-portfolio fallback, that the result names the receiving portfolio, and that a non-'added' status is an answer rather than an error whose message and next_step must be relayed. The explicit disclaimer that it does not trade, record a holding, or move money is exactly the kind of mutation-boundary context annotations cannot convey.

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?

Front-loaded with the action and scope, then the consent rule, then fallback behavior, then result handling and exclusions — a sensible priority order with no filler sentences. It is dense and slightly run-on in the middle ('Relay the result's message, which says where the company went'), which keeps it off 5.

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 4-parameter mutation tool with an output schema, the description covers everything an agent needs: consent gating, portfolio targeting defaults, single-ticker scope, how to interpret and relay the result, what to do on non-success, and the follow-up call. Nothing material is left to inference.

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 meaning on top by explaining the omission behavior of portfolio_id and portfolio_name (both absent means the default portfolio) and by reinforcing the one-ticker constraint on the required field. It does not add exchange-resolution detail beyond what the schema already states ('Resolved automatically if omitted'), so it stops short of 5.

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 ('Add one company to one of the person's StockLens portfolios as a company they follow') and immediately scopes cardinality ('One ticker per call'). It explicitly separates itself from the batch sibling and rules out adjacent operations ('It does not trade, record a holding or move money'), so an agent can place it without opening another schema.

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 consent precondition ('Call it only when the person has asked for it, or agreed to an offer a StockLens result supplied in next_step; a yes to an offer you composed yourself is not agreement') and names the alternative for multi-company cases ('for a list of companies, use add_to_watchlist_batch'). It also prescribes the follow-up call after a get_market_summary-sourced add, which is when-to-use guidance at the sequencing level.

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