Skip to main content
Glama
@gblin-protocol/mcp-server

@gblin-protocol/mcp-server

analyze_treasury_health

Read-onlyIdempotent

Analyze an agent wallet's GBLIN, USDC, and ETH balances to verify ETH covers exit gas, track redemption cooldown, and use optional daily burn to calculate USDC runway and GBLIN surplus.

Instructions

Analyzes an agent wallet's treasury: GBLIN, USDC and ETH balances, whether the ETH covers an exit at the live gas price, and the redemption cooldown. When daily_burn_usd is given it adds days of USDC runway and a split that keeps seven days of spend in USDC and treats only the surplus as a candidate for GBLIN. Free by default; a 0.003 USDC charge applies only when the server operator sets MCP_PAYWALL=true.

Input Schema

NameRequiredDescriptionDefault
_paymentNoBase64-encoded x402 PaymentProof JSON. Omit on first call to receive the 402 payment manifest.
daily_burn_usdNoOptional. Average daily spend in USD (e.g. 1.5).
wallet_addressYesAgent's 0x address.

Output Schema

NameRequiredDescriptionDefault
ratiosNo
walletYes
balancesYes
cooldownYesWhether the redemption cooldown is active and for how long.
gas_healthYesWhether the wallet holds enough ETH for the next transactions.
recommendationYeshold, rebalance_to_gblin or rebalance_to_usdc, with the reason.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.1.5
    • addedInput schema / properties / _payment
      Added value: +{
      +  "description": "Base64-encoded x402 PaymentProof JSON. Omit on first call to receive the 402 payment manifest.",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "balances": {
      +      "type": "object"
      +    },
      +    "cooldown": {
      +      "description": "Whether the redemption cooldown is active and for how long.",
      +      "type": "object"
      +    },
      +    "gas_health": {
      +      "description": "Whether the wallet holds enough ETH for the next transactions.",
      +      "type": "object"
      +    },
      +    "ratios": {
      +      "type": "object"
      +    },
      +    "recommendation": {
      +      "description": "hold, rebalance_to_gblin or rebalance_to_usdc, with the reason.",
      +      "type": "object"
      +    },
      +    "wallet": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "wallet",
      +    "balances",
      +    "gas_health",
      +    "cooldown",
      +    "recommendation"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.1.2

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the read-only, idempotent, non-destructive profile, so the bar is lower; the description still adds real behavior the annotations can't express — the live-gas-price exit check, the cooldown read, and crucially the pricing model (free by default, 0.003 USDC only when the operator sets MCP_PAYWALL=true). It does not describe response shape, but that is covered by the output schema.

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 core capability, then the conditional parameter behavior, then the payment caveat — a sensible ordering. It is dense but each clause carries information; the payment sentence is the only part that could arguably be trimmed, though the cost disclosure is worth keeping.

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?

With a 3-parameter schema, full schema descriptions and an output schema, the description covers everything an agent needs to call it correctly: inputs, computed outputs, conditionality on daily_burn_usd, and cost. The only missing element — sibling differentiation — is scored under purpose/usage rather than completeness.

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?

Schema description coverage is 100%, so the baseline is 3, but the description genuinely adds meaning beyond the schema: it explains that daily_burn_usd triggers runway-in-days computation and a specific allocation split (seven days of spend kept in USDC, only surplus considered for GBLIN). That is decision-relevant semantics the schema does not contain.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Analyzes') and resource ('an agent wallet's treasury') and enumerates the computed outputs: GBLIN/USDC/ETH balances, whether ETH covers an exit at live gas price, and the redemption cooldown. It is clear what the tool does, but it never distinguishes itself from the nearby get_treasury_state or plan_treasury siblings, leaving the agent to infer which treasury view to call.

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 gives a conditional usage signal ('When daily_burn_usd is given it adds days of USDC runway...'), which tells the agent what changes with the optional parameter. However, it offers no when-to-use/when-not guidance relative to get_treasury_state or plan_treasury, so the choice among the three treasury tools is left implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.