Skip to main content
Glama
lodetomasi

Portfolio Copilot

by lodetomasi

rank_candidates

Rank every ticker by investment potential without filtering on size, sector, or index membership; attach informational tags for context. Let only your risk caps size the resulting buys, not this ranking.

Instructions

Score every ticker in tickers (screen_stocks) and rank the WHOLE set by potential -- huge and small caps in the same net. Nothing is excluded for being big, small, already inside an index/ETF, or concentrated in one sector: size, sector and index-overlap are informational tags attached to each ranked idea (portfolio.picker.annotate), never a filter. Only the caller's own risk caps (get_portfolio_config's risk_limits, when path is given) and a later red-team pass should ever limit how big a resulting BUY is sized -- never this ranking itself. top_n only bounds how many of the ranked ideas are returned in ranked; every scored ticker (minus screening-error placeholders, reported separately in screening_errors) still counts toward the summary stats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoLocal broker export used only to compute each candidate's hidden-exposure overlap/diversification tag (portfolio.exposure) -- never to filter the ranking. Omit to rank without portfolio context (themes/diversification come back empty/None for every candidate).
top_nNo
tickersYes
min_confidenceNoBelow this confidence, a candidate stays in the ranking but gets a 'low_confidence' tag in its `tags` list -- information, never a filter.
Behavior5/5

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

With no annotations to lean on, the description carries the full transparency burden and succeeds: it discloses that size/sector/index overlap never filters, that top_n only limits returned ideas while summary stats include all scored tickers, that min_confidence only adds a tag, and that `path` is never used to filter. It also flags that screening errors are reported separately in `screening_errors`. This is unusually thorough behavioral disclosure for a ranking tool.

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?

The description is dense and front-loaded, opening with the core action and then layering constraints. Every sentence contributes: scope, non-filtering behavior, risk-cap context, and top_n semantics. It is longer than average, with repeated 'never' emphasis and internal references like 'portfolio.picker.annotate' and 'portfolio.exposure,' but these earn their place by preventing common misuse.

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 tool with no output schema and no annotations, the description covers the essential context: input source, parameter roles, ranking scope, returned `ranked` ideas, `screening_errors`, summary stats, and portfolio-tag behavior. It does not detail the ranking formula or exact output structure, but it gives enough for an agent to invoke and interpret the tool correctly. The main gap is that it never confirms whether the operation is purely read-only, though the language strongly implies it.

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 50%: `path` and `min_confidence` have schema descriptions, while `tickers` and `top_n` do not. The description compensates by explaining that tickers are the screen_stocks list and that top_n bounds only how many ranked ideas are returned in `ranked` rather than affecting the ranking or summary stats. It adds meaningful semantics beyond the bare schema, though it could have been even more explicit about tickers' format and top_n's range.

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 uses a specific verb+resource pair: 'Score every ticker in `tickers` and rank the WHOLE set by potential.' It also explicitly differentiates itself from filtering tools by stating that nothing is excluded for size, sector, or index overlap, and it references its input source (screen_stocks). An agent can clearly tell what this tool does and how it is distinct from sibling screening/filtering tools.

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 clear context: it operates on tickers from screen_stocks, uses `path` only for portfolio-exposure tagging, and notes that a later red-team pass or the caller's risk caps are the intended downstream limits. However, it never explicitly names alternative tools or states when this tool should not be used, so it stops short of full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lodetomasi/portfolio-copilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server