Skip to main content
Glama

Add a market position

add_market_asset

Add a market-priced position by exact ticker or query, with an optional acquisition date. Pass the purchase as the user said it, in ONE call: units they name go in quantity, with the money they named beside them — a per-unit price or a total cost, and currency = that money's currency ('10 NVDA at $180 on 2 September' → quantity 10, price 180, currency USD, date; '10 NVDA for $1,800' → quantity 10, cost 1800, currency USD); the app converts a price or cost in another currency into the listing currency at that day's rate (a price without currency is in the listing currency; a cost without one is in the display currency). Without units, size by value (what it is worth today) or cost (total paid on date) in currency (default: display currency) and the app reads the day's close and FX rate and works out the quantity; both come back under sizing. Refused: no size, value and cost without quantity, and figures that contradict each other (quantity × today's close far from value, or quantity × price not the cost). The app picks the listing itself when the choice is settled (one the user holds or watches, a coin ticker's -USD pair, an exact ticker; a bare ticker such as BTC that the user does not hold becomes the coin pair they hold) and names it under picked with why. A genuinely open choice adds nothing and returns needsChoice with matches, each carrying its ready action: call again with that match's arguments (without the action key). Missing price uses the actual market close. No broker order is placed. A currency pair (EURCZK=X, or EUR=X, which is US dollars priced in euros) is cash, not a holding: quantity units of the pair's first currency in its group's cash balance. category is the investing category, separate from market sector; omitted or empty means Other. group is the named group it joins (its account in the value breakdown): an existing name from portfolio.assetGroups.marketPriced, or a short new one; omitted, the first existing group. The result carries entryId, the new entry's id for a later edit_asset or toggle_asset.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "add_market_asset"
  }
}

Input Schema

NameRequiredDescriptionDefault
costNo
dateNo
groupNo
priceNo
queryNo
valueNo
symbolNo
categoryNo
currencyNo
quantityNo
dashboardIdNoWhich live dashboard (browser tab) runs it; from get_dashboard_state. Optional when one tab stands out: the tab the user last approved an action in, the only live tab, or the only tab on screen. Refused before any approval when the target is ambiguous or disconnected.
idempotencyKeyNo
expectedRevisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Goes well past the annotations (non-readonly, non-destructive, non-idempotent): it states no broker order is placed, that FX conversion happens at that day's rate, which inputs are refused, how ambiguous listings resolve into picked/needsChoice, and what the result carries (entryId, needsChoice matches). This is exactly the behavioral context the annotations cannot supply.

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 core action and the "ONE call" rule, and nearly every sentence carries operative information rather than filler. The cost is a single dense paragraph with nested parentheticals and very long sentences, which makes it harder to scan than it needs to be.

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?

For a 13-parameter mutation tool with no output schema, the description covers the hard parts: sizing modes, currency defaults, ambiguity resolution, refusals, and the returned entryId/needsChoice. The gap is the technical parameters (idempotencyKey, expectedRevision) that matter for safe retries in a non-idempotent write, which the description never mentions.

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?

With only 8% schema coverage the description must carry the load, and it does for the domain-critical fields: quantity vs price vs cost vs value vs currency, including worked examples and default-currency rules, plus category and group semantics. It leaves symbol vs query, idempotencyKey, expectedRevision, and dashboardId unaddressed in prose (the last is covered by the schema itself), so a few parameters remain unexplained.

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?

"Add a market-priced position by exact ticker or query" gives a specific verb, resource, and the key qualifier (market-priced, resolved from a ticker/query). An agent can tell this is the market-backed add path rather than the manual one. It stops short of naming a sibling, but the resource is unambiguous.

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?

Strong conditional guidance: pass the purchase "in ONE call," explicit refusal conditions ("no size, value and cost without quantity, and figures that contradict each other"), and a concrete retry protocol for needsChoice ("call again with that match's arguments"). It never says when to prefer add_market_asset over add_manual_asset, so alternates are left implicit.

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.