Skip to main content
Glama

Universal Data — x402 + MPP Payment Setup

api_finance_portfolio_rebalance

Read-onlyIdempotent

Compute trades needed to rebalance a user-supplied portfolio toward specified target weights, without executing trades. One call costs 0.01 USDC on Base x402; customer-owned provider credentials use X-Provider-Key header where needed.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "holdings": "<holdings>"
    },
    "name": "api_finance_portfolio_rebalance"
  }
}

Input Schema

NameRequiredDescriptionDefault
holdingsYesholdings; see operation description for units and format

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral facts: a 0.01 USDC per-call charge on Base x402 and the X-Provider-Key header for customer-owned credentials. It stops short of describing return shape or failure modes, so it is strong but not complete.

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?

Two sentences, front-loaded with purpose, with payment and auth details trailing – no filler. The only softness is the vague qualifier "where needed" on the provider-key header, which tells the agent little.

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

Completeness3/5

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

For a single-parameter tool with no output schema, the description covers purpose, cost, and auth but omits the input format it explicitly promises in the schema and gives no indication of what the computed trade output looks like. It is adequate to attempt a call but not complete enough to call confidently without experimentation.

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

Parameters3/5

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

With 100% schema description coverage and a single parameter, the baseline is 3. The schema entry for holdings explicitly defers units and format to "operation description," and the description does not supply them; it also mentions "target weights" that have no corresponding parameter, leaving ambiguous whether weights are embedded in the holdings string. This is a mild but real semantic gap the description should have closed.

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?

"Compute trades needed to rebalance a user-supplied portfolio toward specified target weights" gives a specific verb (compute), a specific resource (trades for rebalancing), and an explicit scope limit ("without executing trades") that separates it from any execution-style sibling. An agent can classify this tool without opening the schema.

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

Usage Guidelines3/5

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

The description implies the usage context by ruling out execution ("without executing trades"), which tells the agent this is an analysis-only step. However, it never names an alternative or states conditions for choosing this over related finance tools such as api_finance_position_risk or api_investment_return, so the routing guidance is left to inference.

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