Skip to main content
Glama

Update a position

update_position
Destructive

Add, update or remove a holding in the signed-in user's InvestIQ portfolio — this RECORDS the position for tracking, it is NOT a brokerage order and never moves money. action 'add' blends into any existing line (weighted avg cost); 'update' overwrites qty/avgPrice; 'remove' deletes the line. Requires the user to be connected.

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>",
      "action": "<action>"
    },
    "name": "update_position"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYes
tickerYes
avgPriceNo
quantityNo
portfolioNooptional portfolio name; defaults to the user's primary portfolio

Output Schema

NameRequiredDescriptionDefault
okYesfalse on an error; then `error` says what happened and what to do.
cardNoThe in-chat InvestIQ card, in English and French.
dataNoThe tool's own result fields.
toolYes
as_ofYesISO time the data was computed (a stored analysis: when it was computed).
errorNo
linksNoInvestIQ pages for this result.
degradedNotrue when part of the data was missing.
viz_specNoThe recommended chart's series (data only).
disclaimerYes
data_qualityNoWhat was requested, what was used, and why anything was left out.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses what actually gets destroyed on 'remove' (the whole line), that 'add' performs weighted-average cost blending rather than simple insertion, that 'update' overwrites qty/avgPrice, and that no money moves. This directly enriches the destructiveHint=true and idempotentHint=false annotations with concrete consequences.

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?

Three tightly packed sentences: the identity and non-brokerage framing first, then per-action behavior, then the connection prerequisite. No filler, and the most consequential warning (not an order / no money moves) is front-loaded.

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?

With an output schema present, return values need no explanation, and the mutation semantics are well covered. The remaining gap is field-level requirements per action mode, which matters for a destructive write tool but is partly excused by the schema.

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 description coverage is only 20% (only 'portfolio' is documented), yet the description supplies semantics for the action enum values and ties avgPrice/quantity to their behavior ('overwrites qty/avgPrice', 'weighted avg cost'). It does not clarify whether quantity/avgPrice are required for 'add' or must be omitted for 'remove', leaving a real ambiguity.

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 set (add/update/remove) against a specific resource (a holding in the user's InvestIQ portfolio), and explicitly contrasts it with what it is not ('NOT a brokerage order'). An agent knows exactly what object is being mutated without opening the schema.

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

Usage Guidelines4/5

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

Gives clear per-action semantics ('add' blends into an existing line, 'update' overwrites, 'remove' deletes) and a prerequisite ('Requires the user to be connected'). It stops short of naming explicit alternatives such as add_to_watchlist for watch-only tracking, so the routing guidance is strong but not complete.

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