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).

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?

Annotations only say readOnly=false/openWorld=true/idempotent=false/destructive=false; the description adds the versioned no-overwrite guarantee, policy-conflict precedence, warning behavior, HMAC secret lifecycle, and hard-rule constraints. This is far beyond the structured metadata.

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?

Long but dense and organized; the first sentence states the operation, and each paragraph covers a distinct concern (versioning, policy interaction, secret handling, workflow). No filler.

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?

For an 11-param write tool with no schema descriptions, this covers the versioning model, policy interaction, secret lifecycle, and usage timing. The existence of an output schema covers return-value details, and the missing params are minor relative to the overall guidance.

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 coverage the description carries the burden, and it explains risk_band values, banned_tokens merging, target_allocations sum constraint, and webhook secret rotation. However, max_position_pct, body_markdown, caller_id, and wallet_address are left undocumented.

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 ('Write a new version of the wallet's portfolio charter'), then clarifies the versioned behavior and distinguishes it from an in-place overwrite. This is enough to separate it from get_portfolio_charter and set_wallet_policy.

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?

Explicitly places the tool in the workflow ('ORIENT step 0 -- set once at the start of a relationship') and says strategies read it on every tick, pointing to get_trading_workflow. It doesn't name alternative tools or state when not to use it, so not a 5.

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