Skip to main content
Glama

set_portfolio_charter

Write a new version of the wallet's portfolio charter (free control-plane write).

Creates a new active version -- the prior version stays in history, never deleted (versioned mandate, not an in-place overwrite). risk_band is one of conservative|balanced|aggressive. banned_tokens merge into AgentWallet.evaluate_trade as an ADDITIONAL deny source alongside WalletPolicy.banned_tokens -- an active WalletPolicy always wins when it is the stricter rule; a charter can never loosen an existing policy, and a conflict comes back in the response's warnings (logged server-side, never silently dropped). target_allocations is {token: percent}, must sum to <=100. objectives/cadence are free-form parameters -- never phrase them as return promises (hard rules 5-8).

Setting an escalation_webhook mints a platform-generated escalation_webhook_secret used to HMAC-SHA256-sign every escalation POST (X-Crank-Signature over "{timestamp}.{body}"). The RAW secret is returned exactly once -- in this write's response -- so the receiver can be configured; every later read returns it masked. It is carried forward unchanged when the URL is unchanged, rotated automatically when the URL changes, and rotated on demand with rotate_escalation_secret=true. It is a receiver-authentication credential, never wallet key or seed material (hard rule 1).

Workflow: ORIENT step 0 -- set once at the start of a relationship with an agent/wallet; strategies read it on every execute_strategy tick (see get_trading_workflow).

Permission mode: a configuration write -- allowed in every permission_mode, observe included; the ladder gates value-bearing actions, not config.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cadenceNo
caller_idNo
risk_bandNo
objectivesNo
banned_tokensNo
body_markdownNo
wallet_addressYes
max_position_pctNo
escalation_webhookNo
target_allocationsNo
rotate_escalation_secretNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / rotate_escalation_secret
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes far beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true): prior versions are retained in history rather than overwritten; banned_tokens merge as an additional deny source where an active WalletPolicy wins on conflict and conflicts surface in `warnings`; the escalation secret is returned raw exactly once then masked, carried forward or rotated on URL change. These are exactly the operational facts an agent needs and cannot infer from annotations.

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?

Front-loaded with the versioning/retention behavior, which is the single most important fact. The content is dense and largely earns its space, but the multi-paragraph structure with hard-rule parentheticals is longer than strictly necessary.

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 complex 11-param mutation with an output schema present, the description covers the write semantics, conflict handling, secret lifecycle, and permission-mode behavior thoroughly, so it does not need to restate return values. The only gap is a few undocumented parameters (max_position_pct, body_markdown, caller_id).

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?

With 0% schema description coverage across 11 params, the description compensates well: it enumerates risk_band's three values, defines target_allocations as {token: percent} summing to <=100, explains banned_tokens merge behavior, and covers escalation_webhook and rotate_escalation_secret. It leaves max_position_pct, body_markdown, and caller_id unaddressed, so it is not fully complete.

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+resource ('write a new version of the wallet's portfolio charter') and immediately clarifies the versioning semantics, which distinguishes it from the read sibling get_portfolio_charter and from set_wallet_policy. An agent can identify the tool's role 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 Guidelines5/5

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

Explicitly frames this as the 'ORIENT step 0' to be set once at the start of an agent/wallet relationship, notes that strategies read it on every execute_strategy tick, cross-references get_trading_workflow, and clarifies it is allowed in every permission_mode including observe. The when-to-use condition is unambiguous.

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