Skip to main content
Glama

Build an allocation

build_allocation
Read-only

Convert verified stock candidates and available cash into equal-weight whole-share targets, with a per-name cap and round-down sizing that never exceeds your balance.

Instructions

Turn a verified candidate list and a cash balance into whole-share position targets. Equal weight by default, with a per-name cap and whole-share rounding that always rounds down, so the plan can never exceed the balance. Only pass names you have actually verified with analyze_ticker: a weighting implies a level of diligence a screen does not provide.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
candidatesYes
perTradeCostNoPer-trade commission, subtracted before sizing.
availableCashYesCash available to deploy.
maxPositionFractionNoHard ceiling on any one name, as a fraction of the balance.
allowFractionalSharesNoMost brokers settle whole lots; off by default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint/openWorldHint, so the description adds real value: it discloses the rounding policy ('always rounds down'), the guarantee that the plan never exceeds the balance, and the equal-weight/cap defaults. It stops short of describing failure modes (e.g. cash too small for a single share) or the shape of the returned plan.

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?

Two sentences, tightly front-loaded with the transformation and its defaults, then the verification constraint. No filler, and every clause carries actionable information.

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?

No output schema exists, so the description must carry the return-value burden; it gestures at 'whole-share position targets' but never specifies the response fields or what a caller can expect back. Behavioral and input guidance are otherwise sufficient for a 5-parameter computation tool.

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 already 80%, and the description reinforces the two behaviorally important parameters: omitting weight means equal weight (with rationale), and a per-name cap applies. It adds intent beyond the schema text but does not clarify perTradeCost or fractional-share edge cases beyond what the schema states.

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 ('Turn a verified candidate list and a cash balance into whole-share position targets') along with the core method defaults (equal weight, per-name cap). The mention of 'verified candidate list' implicitly separates it from screening tools, so an agent can distinguish it from siblings like screen_market or plan_rebalance.

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?

Explicit prerequisite: only pass names verified with analyze_ticker, with a stated reason ('a weighting implies a level of diligence a screen does not provide'), which steers agents away from screen_market output. It does not, however, state when to prefer this over plan_rebalance, so the alternative-selection guidance is incomplete rather than absent.

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