Skip to main content
Glama

Close Portfolio Lot

ClosePortfolioLot

Record that the USER sold (or covered, or let expire) all or part of a lot, at a price and on a date. The lot moves out of the open positions and its realized profit is kept. Ask the user for the closing price and date; never guess them from a market quote.

Closing PART of a lot splits it: the closed part keeps the original cost basis and the rest stays open on that same basis, so a later sale is still priced against what was actually paid.

An option that expired worthless closes at a price of 0. An option that was exercised or assigned closes here too, and the resulting shares are a separate AddPortfolioLot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lotIdYesThe lot id shown by GetMyPortfolio, e.g. a1b2c3d4.
quantityNoOptional. How much of the lot to close, as a positive size. Omit to close all of it.
closeDateYesThe closing date, as yyyy-MM-dd. Cannot be in the future or before the lot was acquired.
portfolioYesThe portfolio holding the lot, by name.
closePriceYesPrice per share received (or paid, to cover a short). Zero for an option that expired worthless.

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=false (mutation) and destructiveHint=false (not destructive). The description adds valuable context: 'The lot moves out of the open positions and its realized profit is kept.' It explains partial close splitting behavior and how options work. This goes beyond annotations and provides necessary behavioral disclosure.

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?

The description is well-structured: first paragraph states the primary action with a critical user instruction, second explains partial close behavior, third handles options edge cases. Every sentence adds value, no redundancy, and key information 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?

Given the tool's complexity (partial close, options handling) and the absence of an output schema, the description covers the recording action, user interaction requirement, splitting behavior, and connection to AddPortfolioLot. A brief note on the expected response (e.g., confirmation or updated portfolio) would make it fully complete, but the current level is strong.

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 baseline is 3. The description adds meaning: clarifies that quantity is optional (omit to close all), closeDate cannot be future or before acquisition, and closePrice is per share received/paid (zero for expired worthless). This adds value beyond the schema's own descriptions, especially for the zero-price case and the partial close behavior.

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?

The description clearly identifies the verb 'Record that the USER sold (or covered, or let expire)' and the resource 'all or part of a lot'. It distinguishes from siblings by noting that options exercised/assigned require a separate AddPortfolioLot for resulting shares, and implies a difference from RemovePortfolioLot by focusing on recording a sale with price and date.

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?

The description provides explicit guidance: 'Ask the user for the closing price and date; never guess them from a market quote.' It explains how to handle options (expired worthless at price 0, exercised/assigned leads to AddPortfolioLot). While it does not explicitly list when not to use this tool versus RemovePortfolioLot or UpdatePortfolioLot, the context and examples are clear enough for correct usage.

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.

TDQS

B3.4/5.0
Disambiguation4/5

Most tools have clearly distinct purposes, with detailed descriptions that cross-reference related alternatives. A few near-duplicate names could cause misselection, notably SearchDocument versus SearchDocuments and GetCftcPositioning versus GetLatestCftcPositioning.

Naming Consistency5/5

Tool names consistently follow a VerbNoun camelCase pattern: Get for retrievals, Search for discovery, List/Read for document access, and Add/Close/Remove/Update/Watch/Create/Delete for portfolio mutations. Despite the large count, there is no mixing of naming conventions or unpredictable verb styles.

Tool Count1/5

108 tools is an extreme surface area, far beyond the 3-15 well-scoped range and well past the 25+ threshold. Even for a broad financial data platform, this creates a heavy selection burden and substantial context overhead for agents.

Completeness4/5

The server covers an unusually wide domain: prices, fundamentals, SEC filings, options, insider activity, 13F holdings, short interest, macro data, funds, IPOs, and full portfolio lifecycle management. Notable gaps remain, such as a basic company profile/ticker-resolution tool, dividend history, and analyst estimates, so it is not a perfect 5.