Skip to main content
Glama

Amend a trading or treasury mandate

wever_mandate-amend
Idempotent

Replace a version with a principal-approved amendment. Agent proposals may only narrow. Costs $2.00 (2.00 USDC on Base). POST /api/mandate-amend. Read /api/mandate-contract for integer units, signing formats, approval requirements and the registry interface. Issue and amend use the existing x402 payment rail. Status, halt and revoke have no payment requirement. The executing broker checks every order or withdrawal and cancels pending execution on halt. Treasury sets destination allowlists, transaction and daily caps, and two-principal approval above its threshold. The registrar timestamps versions and chain fingerprints. Human page: https://weverlabs.com/trading-mandate/.

Input Schema

NameRequiredDescriptionDefault
mandateYes
approvalYes
proposalYes
proposal_wallet_signatureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedInput schema / properties / mandate / additionalProperties
      Removed value: -false
    • addedInput schema / properties / mandate / oneOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "agent_key": {
      +        "maxLength": 256,
      +        "minLength": 50,
      +        "type": "string"
      +      },
      +      "approval_path": {
      +        "enum": [
      +          "wallet_signature",
      +          "broker_attestation"
      +        ]
      +      },
      +      "assets": {
      +        "items": {
      +          "maxLength": 128,
      +          "minLength": 1,
      +          "pattern": "^[A-Za-z0-9_.:-]+$",
      +          "type": "string"
      +        },
      +        "maxItems": 16,
      +        "minItems": 1,
      +        "type": "array",
      +        "uniqueItems": true
      +      },
      +      "broker": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "id": {
      +            "pattern": "^[a-f0-9]{64}$",
      +            "type": "string"
      +          },
      +          "key": {
      +            "maxLength": 256,
      +            "minLength": 50,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "key"
      +        ],
      +        "type": "object"
      +      },
      +      "daily_loss_cap": {
      +        "maximum": 1000000000000,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "daily_reset": {
      +        "const": "00:00 UTC"
      +      },
      +      "mandate_id": {
      +        "pattern": "^[a-f0-9]{64}$",
      +        "type": "string"
      +      },
      +      "max_leverage_milli": {
      +        "maximum": 100000,
      +        "minimum": 1000,
      +        "type": "integer"
      +      },
      +      "order_types": {
      +        "items": {
      +          "enum": [
      +            "limit",
      +            "market",
      +            "reduce-only"
      +          ]
      +        },
      +        "maxItems": 16,
      +        "minItems": 1,
      +        "type": "array",
      +        "uniqueItems": true
      +      },
      +      "position_caps": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "per_asset": {
      +            "additionalProperties": {
      +              "maximum": 1000000000000,
      +              "minimum": 1,
      +              "type": "integer"
      +            },
      +            "maxProperties": 16,
      +            "minProperties": 1,
      +            "propertyNames": {
      +              "maxLength": 128,
      +              "minLength": 1,
      +              "pattern": "^[A-Za-z0-9_.:-]+$",
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "total": {
      +            "maximum": 1000000000000,
      +            "minimum": 1,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "per_asset",
      +          "total"
      +        ],
      +        "type": "object"
      +      },
      +      "previous_fingerprint": {
      +        "anyOf": [
      +          {
      +            "pattern": "^[a-f0-9]{64}$",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "principal": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "account_id": {
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "pattern": "^[A-Za-z0-9_.:-]+$",
      +            "type": "string"
      +          },
      +          "wallet": {
      +            "pattern": "^0x[0-9a-fA-F]{40}$",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "account_id",
      +          "wallet"
      +        ],
      +        "type": "object"
      +      },
      +      "profile": {
      +        "const": "trading"
      +      },
      +      "usage": {
      +        "enum": [
      +          "operational",
      +          "synthetic"
      +        ]
      +      },
      +      "valid_from": {
      +        "maximum": 4102444800,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "valid_to": {
      +        "maximum": 4102444800,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "venues": {
      +        "items": {
      +          "maxLength": 128,
      +          "minLength": 1,
      +          "pattern": "^[A-Za-z0-9_.:-]+$",
      +          "type": "string"
      +        },
      +        "maxItems": 16,
      +        "minItems": 1,
      +        "type": "array",
      +        "uniqueItems": true
      +      },
      +      "version": {
      +        "maximum": 10000,
      +        "minimum": 1,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "mandate_id",
      +      "version",
      +      "previous_fingerprint",
      +      "principal",
      +      "approval_path",
      +      "agent_key",
      +      "broker",
      +      "venues",
      +      "assets",
      +      "max_leverage_milli",
      +      "position_caps",
      +      "daily_loss_cap",
      +      "daily_reset",
      +      "order_types",
      +      "valid_from",
      +      "valid_to",
      +      "usage",
      +      "profile"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "agent_key": {
      +        "maxLength": 256,
      +        "minLength": 50,
      +        "type": "string"
      +      },
      +      "approval_path": {
      +        "enum": [
      +          "wallet_signature",
      +          "broker_attestation"
      +        ]
      +      },
      +      "asset": {
      +        "const": "USDC"
      +      },
      +      "broker": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "id": {
      +            "pattern": "^[a-f0-9]{64}$",
      +            "type": "string"
      +          },
      +          "key": {
      +            "maxLength": 256,
      +            "minLength": 50,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "key"
      +        ],
      +        "type": "object"
      +      },
      +      "daily_reset": {
      +        "const": "00:00 UTC"
      +      },
      +      "daily_withdrawal_cap": {
      +        "maximum": 1000000000000,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "destination_allowlist": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "address": {
      +              "pattern": "^0x[0-9a-f]{40}$",
      +              "type": "string"
      +            },
      +            "network": {
      +              "pattern": "^(paper|eip155:[1-9][0-9]{0,12})$",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "network",
      +            "address"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 32,
      +        "minItems": 1,
      +        "type": "array",
      +        "uniqueItems": true
      +      },
      +      "dual_approval": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "principal_wallets": {
      +            "items": {
      +              "pattern": "^0x[0-9a-f]{40}$",
      +              "type": "string"
      +            },
      +            "maxItems": 8,
      +            "minItems": 2,
      +            "type": "array",
      +            "uniqueItems": true
      +          },
      +          "threshold": {
      +            "maximum": 1000000000000,
      +            "minimum": 0,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "threshold",
      +          "principal_wallets"
      +        ],
      +        "type": "object"
      +      },
      +      "mandate_id": {
      +        "pattern": "^[a-f0-9]{64}$",
      +        "type": "string"
      +      },
      +      "per_transaction_cap": {
      +        "maximum": 1000000000000,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "previous_fingerprint": {
      +        "anyOf": [
      +          {
      +            "pattern": "^[a-f0-9]{64}$",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "principal": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "account_id": {
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "pattern": "^[A-Za-z0-9_.:-]+$",
      +            "type": "string"
      +          },
      +          "wallet": {
      +            "pattern": "^0x[0-9a-fA-F]{40}$",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "account_id",
      +          "wallet"
      +        ],
      +        "type": "object"
      +      },
      +      "profile": {
      +        "const": "treasury"
      +      },
      +      "usage": {
      +        "enum": [
      +          "operational",
      +          "synthetic"
      +        ]
      +      },
      +      "valid_from": {
      +        "maximum": 4102444800,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "valid_to": {
      +        "maximum": 4102444800,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "version": {
      +        "maximum": 10000,
      +        "minimum": 1,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "mandate_id",
      +      "version",
      +      "previous_fingerprint",
      +      "principal",
      +      "approval_path",
      +      "agent_key",
      +      "broker",
      +      "valid_from",
      +      "valid_to",
      +      "usage",
      +      "daily_reset",
      +      "profile",
      +      "asset",
      +      "destination_allowlist",
      +      "per_transaction_cap",
      +      "daily_withdrawal_cap",
      +      "dual_approval"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / mandate / properties
      Removed value: -{
      -  "agent_key": {
      -    "maxLength": 256,
      -    "minLength": 50,
      -    "type": "string"
      -  },
      -  "approval_path": {
      -    "enum": [
      -      "wallet_signature",
      -      "broker_attestation"
      -    ]
      -  },
      -  "assets": {
      -    "items": {
      -      "maxLength": 128,
      -      "minLength": 1,
      -      "pattern": "^[A-Za-z0-9_.:-]+$",
      -      "type": "string"
      -    },
      -    "maxItems": 16,
      -    "minItems": 1,
      -    "type": "array",
      -    "uniqueItems": true
      -  },
      -  "broker": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "id": {
      -        "pattern": "^[a-f0-9]{64}$",
      -        "type": "string"
      -      },
      -      "key": {
      -        "maxLength": 256,
      -        "minLength": 50,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "id",
      -      "key"
      -    ],
      -    "type": "object"
      -  },
      -  "daily_loss_cap": {
      -    "maximum": 1000000000000,
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  "daily_reset": {
      -    "const": "00:00 UTC"
      -  },
      -  "mandate_id": {
      -    "pattern": "^[a-f0-9]{64}$",
      -    "type": "string"
      -  },
      -  "max_leverage_milli": {
      -    "maximum": 100000,
      -    "minimum": 1000,
      -    "type": "integer"
      -  },
      -  "order_types": {
      -    "items": {
      -      "enum": [
      -        "limit",
      -        "market",
      -        "reduce-only"
      -      ]
      -    },
      -    "maxItems": 16,
      -    "minItems": 1,
      -    "type": "array",
      -    "uniqueItems": true
      -  },
      -  "position_caps": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "per_asset": {
      -        "additionalProperties": {
      -          "maximum": 1000000000000,
      -          "minimum": 1,
      -          "type": "integer"
      -        },
      -        "maxProperties": 16,
      -        "minProperties": 1,
      -        "propertyNames": {
      -          "maxLength": 128,
      -          "minLength": 1,
      -          "pattern": "^[A-Za-z0-9_.:-]+$",
      -          "type": "string"
      -        },
      -        "type": "object"
      -      },
      -      "total": {
      -        "maximum": 1000000000000,
      -        "minimum": 1,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "per_asset",
      -      "total"
      -    ],
      -    "type": "object"
      -  },
      -  "previous_fingerprint": {
      -    "anyOf": [
      -      {
      -        "pattern": "^[a-f0-9]{64}$",
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ]
      -  },
      -  "principal": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "account_id": {
      -        "maxLength": 128,
      -        "minLength": 1,
      -        "pattern": "^[A-Za-z0-9_.:-]+$",
      -        "type": "string"
      -      },
      -      "wallet": {
      -        "pattern": "^0x[0-9a-fA-F]{40}$",
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      }
      -    },
      -    "required": [
      -      "account_id",
      -      "wallet"
      -    ],
      -    "type": "object"
      -  },
      -  "usage": {
      -    "enum": [
      -      "operational",
      -      "synthetic"
      -    ]
      -  },
      -  "valid_from": {
      -    "maximum": 4102444800,
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  "valid_to": {
      -    "maximum": 4102444800,
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  "venues": {
      -    "items": {
      -      "maxLength": 128,
      -      "minLength": 1,
      -      "pattern": "^[A-Za-z0-9_.:-]+$",
      -      "type": "string"
      -    },
      -    "maxItems": 16,
      -    "minItems": 1,
      -    "type": "array",
      -    "uniqueItems": true
      -  },
      -  "version": {
      -    "maximum": 10000,
      -    "minimum": 1,
      -    "type": "integer"
      -  }
      -}
    • removedInput schema / properties / mandate / required
      Removed value: -[
      -  "mandate_id",
      -  "version",
      -  "previous_fingerprint",
      -  "principal",
      -  "approval_path",
      -  "agent_key",
      -  "broker",
      -  "venues",
      -  "assets",
      -  "max_leverage_milli",
      -  "position_caps",
      -  "daily_loss_cap",
      -  "daily_reset",
      -  "order_types",
      -  "valid_from",
      -  "valid_to",
      -  "usage"
      -]
    • removedInput schema / properties / mandate / type
      Removed value: -"object"
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

Despite annotations covering idempotency and safety, the description adds real operational detail the annotations can't: a $2.00 USDC-on-Base charge, the x402 payment rail, the narrowing constraint on agent proposals, and registrar version/fingerprint timestamping. It does not explain what happens to the prior version beyond the word "Replace", which keeps it from a 5.

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 action and price are correctly front-loaded, but the middle of the description drifts into general system behavior (broker order checking, treasury caps, registrar timestamping) that is background rather than call guidance. It reads as a compressed spec dump rather than a tight, purpose-built tool description.

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?

Given a schema with two large mutually exclusive mandate shapes and no output schema, the description is under-powered for the parameter surface, leaning on an external contract document. It does cover cost, payment rail, and a key behavioral limit, so an agent knows whether to call it, but not confidently how to build the payload.

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?

Schema description coverage is 0% across four parameters containing deep oneOf branches for trading vs treasury mandates, so the description carries a heavy burden. It partially compensates by describing treasury behaviors that map to schema fields (destination allowlists, transaction and daily caps, two-principal approval threshold) and by pointing to /api/mandate-contract for integer units and signing formats, but it never explains the mandate/approval/proposal/proposal_wallet_signature structure itself.

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?

The opening sentence gives a specific verb and resource ("Replace a version with a principal-approved amendment") and clarifies the replace-vs-create distinction against the issue tool. The later line "Issue and amend use the existing x402 payment rail. Status, halt and revoke have no payment requirement" additionally separates this tool from the halt/status/revoke siblings by payment profile.

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?

It states a concrete constraint on use ("Agent proposals may only narrow") and directs the caller to /api/mandate-contract for signing and approval requirements. What's missing is an explicit "use this instead of mandate-issue when..." routing sentence, so the choice between amending and re-issuing is implied rather than stated.

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.