Skip to main content
Glama

build_portfolio

Read-onlyIdempotent

Builds a custom portfolio of US listed ETFs from construction choices about the portfolio, and shows the rule it applied. Two forms. Weights (ETFIQ custom construction rule, version 2): pass weights, the user's own percent for each asset class, adding to exactly 100, for example {"us-stocks": 40, "international-stocks": 15, "us-bonds": 25, "gold": 10, "reits": 10}. The asset classes: us-stocks, us-small-stocks, international-stocks (broad, market-cap-weighted index funds only), international-dividend-stocks, international-esg-stocks, international-factor-stocks, international-ipo-stocks (each only when the user asks for that tilt), emerging-markets-stocks, reits, us-bonds (core, intermediate), us-bonds-short, us-bonds-long, us-corporate-bonds, government-bonds-short, government-bonds-intermediate, government-bonds-long, tips, high-yield-bonds, cash (Treasury bills), gold, commodities (broad), alternatives. Defaults: cheapest funds, one fund per asset class, no fee ceiling; the answer's defaults.line names the ones used. Band (version 1): pass band, include and funds, and the rule sets the weights (stocks at the band's point, international, broad market-cap-weighted funds only, 40% of stocks outside themes, themes 10% of stocks, commodities and alternatives 5% each from bonds, US bonds the rest). In each asset class or sleeve the cheapest (or largest) funds that file N-PORT (a gold trust: its 10-Q or 10-K), hold at least $100 million and have three years of prices, each fund's fee with its filing date. Weights given in words go to the weights form mapped to the ids above. Only two things have no default, and each is refused with its kind: weights that do not add to 100 (kind weights-total) and an asset class with no id here (kind unknown-class). With neither weights nor a band, the tool needs one of them; the bands by stock share are conservative: more than 15% and up to 30% stocks; moderately-conservative: more than 30% and up to 50%; moderate: more than 50% and up to 70%; moderately-aggressive: more than 70% and up to 85%; aggressive: more than 85%. The tool takes nothing about the person: an argument giving their age, income, savings, net worth, goals, time horizon, tax situation, risk tolerance, employment or family is refused (kind person), and weights and bands are the user's choices about the portfolio, not facts about someone. Whether a portfolio suits someone, or whether to buy or sell it, is not something ETFIQ answers, and the not-advice line says so. Its returns field carries the portfolio's hypothetical returns (ETFIQ custom rule, version 3: the weights reset at every month end, as the ETFIQ benchmarks are): total return, return a year, volatility and month-end drawdown over 1Y, 3Y, 5Y, 10Y and since the first month end all its funds share, a window given only where every fund has prices across it; returns.common.sentence says where the history starts and why. They are hypothetical: no window is extended, and no return is estimated beyond the ones given. compare_to_benchmark takes the answer's compare.arguments to set the portfolio beside an ETFIQ benchmark. Every response carries the not-advice line in not_advice, written to be shown with the portfolio.

Input Schema

NameRequiredDescriptionDefault
bandNoVersion 1: the stock-share band the portfolio should sit in.
fundsNoHow many funds: 2 to 12 with a band; with weights, at least one per asset class (the default).
includeNo
weightsNoVersion 2: the user's own percent of the portfolio for each asset class, adding to 100.
criterionNocheapest
feeCeilingNoThe most any one fund may charge, in percent a year (0.25 is 0.25%).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / weights / properties / international-dividend-stocks
      Added value: +{
      +  "description": "International dividend stocks",
      +  "maximum": 100,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / weights / properties / international-esg-stocks
      Added value: +{
      +  "description": "International ESG-screened stocks",
      +  "maximum": 100,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / weights / properties / international-factor-stocks
      Added value: +{
      +  "description": "International factor stocks",
      +  "maximum": 100,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / weights / properties / international-ipo-stocks
      Added value: +{
      +  "description": "International IPO stocks",
      +  "maximum": 100,
      +  "minimum": 0,
      +  "type": "number"
      +}
  2. Changed5 schema fields changed
    • changedInput schema / properties / band / description
      Previous value: -"The stock-share band the portfolio should sit in."New value: +"Version 1: the stock-share band the portfolio should sit in."
    • addedInput schema / properties / funds / description
      Added value: +"How many funds: 2 to 12 with a band; with weights, at least one per asset class (the default)."
    • changedInput schema / properties / funds / minimum
      Previous value: -2New value: +1
    • addedInput schema / properties / weights
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Version 2: the user's own percent of the portfolio for each asset class, adding to 100.",
      +  "minProperties": 1,
      +  "properties": {
      +    "alternatives": {
      +      "description": "Alternatives",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "cash": {
      +      "description": "Cash (Treasury bills)",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "commodities": {
      +      "description": "Commodities",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "emerging-markets-stocks": {
      +      "description": "Emerging-market stocks",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "gold": {
      +      "description": "Gold",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "government-bonds-intermediate": {
      +      "description": "Intermediate US government bonds",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "government-bonds-long": {
      +      "description": "Long-term US government bonds",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "government-bonds-short": {
      +      "description": "Short-term US government bonds",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "high-yield-bonds": {
      +      "description": "High-yield bonds",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "international-stocks": {
      +      "description": "International stocks",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "reits": {
      +      "description": "REITs",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "tips": {
      +      "description": "Inflation-protected bonds",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "us-bonds": {
      +      "description": "US bonds",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "us-bonds-long": {
      +      "description": "Long-term US bonds",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "us-bonds-short": {
      +      "description": "Short-term US bonds",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "us-corporate-bonds": {
      +      "description": "US corporate bonds",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "us-small-stocks": {
      +      "description": "US small-cap stocks",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "us-stocks": {
      +      "description": "US stocks",
      +      "maximum": 100,
      +      "minimum": 0,
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "band",
      -  "include",
      -  "funds"
      -]
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial context beyond them: default fund selection (cheapest, one per class, no fee ceiling), the answer's defaults.line, refusal semantics, the not_advice line on every response, and the fact that returns are hypothetical with no extrapolation. It also warns that suitability and buy/sell questions are out of scope, which is behavior an agent cannot get from the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the two forms are front-loaded, but the body is a dense run-on that re-enumerates the entire asset-class list already present in the weights schema and spends a long paragraph on return-versioning details that matter more to output interpretation than to tool selection. Valuable content, but not every sentence earns its place in a selection-oriented description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, yet the description covers the return fields (total/average annual/volatility/drawdown across windows), the common.sentence explanation of start date, the not_advice line, defaults.line, and the compare.arguments handoff. For a complex nested-schema tool with zero required parameters, an agent has everything needed to call it and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, and the description compensates well: it maps natural-language weights to the exact asset-class ids, explains that international-stocks is broad market-cap-weighted only while themed variants require an explicit tilt request, and defines the band-to-stock-share ranges. It also states defaults for criterion and fee ceiling behavior (cheapest funds, no fee ceiling) beyond what the schema says.

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?

Opens with a specific verb and resource ('Builds a custom portfolio of US listed ETFs from construction choices') and states it also shows the rule applied. It distinguishes the two construction forms and explicitly names compare_to_benchmark as the sibling that consumes its output, so an agent can place it immediately.

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

Usage Guidelines5/5

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

Extremely explicit about when to use the weights form versus the band form, including the exact conditions (weights must sum to 100; band sets weights by stock share). It names the two refusal kinds (weights-total, unknown-class), excludes person-related inputs with kind person, and explains how to hand off to compare_to_benchmark — no inference required.

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