Skip to main content
Glama

Commit or withdraw a buyer budget envelope (step 1 of 2)

prepare_net_envelope
Read-onlyIdempotent

BUYER BUDGET ENVELOPE: record the NET you say you may put toward named work in a work period, see it, or withdraw it. You say, in plain words, what the budget is for, how many NET units you cap it at, and when the work period starts and ends (commit), or you end the record (withdraw). FREE, a signed statement, no fee, no gas, and your NET never moves. An envelope is a record, never custody and never a lock: your NET stays in your own wallet, nothing is held or sent, and you can spend it or withdraw the record at any time, even when new program actions are stopped. It is not an offer on any job and pays no one. When you commit, the door checks the units against your wallet's fresh NET balance less everything it already stands behind (your offers, orders, reserves and other envelopes), and refuses if it does not cover; nothing is recorded then. You may name a board packet (workId) the budget is for; the work itself is posted, claimed, proven and accepted on the board by other people, and your offer there is your own signature. One NET is 1,000,000 units. Never put a phone number, an email or a street address in any field. Returns MESSAGE_TO_SIGN and BODY_JSON; sign with the buyer wallet's personal_sign, then call submit_net_envelope within 5 minutes. Cost and signer: free, no gas; the person signs the result with their own wallet or passkey, and the house never holds a key.

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": {
      "act": "<act>",
      "principal": "<principal>",
      "envelopeId": "<envelopeId>"
    },
    "name": "prepare_net_envelope"
  }
}

Input Schema

NameRequiredDescriptionDefault
actYescommit a new envelope, or withdraw one you hold.
endAtNocommit: when it ends, an ISO time in the future, at most 365 days after startAt.
unitsNocommit: your cap in whole NET units, at least 1 (one NET is 1,000,000 units).
reasonNowithdraw: optional, one plain sentence, up to 280 characters.
workIdNocommit: optional. The id of a packet on the board this budget is for.
outcomeNocommit: what this budget is for, in plain words, 8 to 300 characters. No phone number, email or street address.
startAtNocommit: when the authorized work period starts, an ISO time.
principalYesThe 0x… address that signs: the wallet that holds the envelope. Address only, never a private key.
envelopeIdYesThe envelope's id: 1 to 80 letters, numbers and . _ : -. You choose it when you commit; the same id and the same terms read the envelope back.

Output Schema

NameRequiredDescriptionDefault
okNo
toolNo
fundedNo
payUsdNo
workIdNo
claimIdNo
claimableNo
next_callNo
proofRuleNo
fulfillableByNo
definitionOfDoneNo
needs_from_callerNo
notClaimableReasonNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses cost (free, no gas), custody semantics (NET never moves, nothing held or sent), the refusal behavior when the balance is insufficient, the 5-minute signing window, and the required personal_sign flow. This is exactly the behavioral context a prepare tool needs.

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?

Purpose and the signer/return contract are front-loaded, and the commit/withdraw distinction is structured clearly. There is mild redundancy ('free, no gas' and the wallet-custody point are each stated twice), but every block carries relevant safety or flow information.

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 a financial prepare step with an output schema available, the description still covers cost, signer, timing, failure mode, and cross-references the submit step. Nothing an agent needs to call this correctly or explain it to a user is missing.

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 100%, so the schema already documents every parameter including units conversion, outcome length limits, and the 365-day endAt bound. The description adds the framing of workId as a 'board packet' and the units-per-NET reminder, but generally restates rather than extends the schema, so the baseline 3 applies.

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 description opens with a specific verb+resource ('record the NET you say you may put toward named work in a work period'), names both operations (commit/withdraw/view), and explicitly positions itself as step 1 of 2 by saying it 'Returns MESSAGE_TO_SIGN and BODY_JSON' and then points to submit_net_envelope. An agent can distinguish this from the submit sibling and from the prepare_net_* family 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 Guidelines4/5

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

It clearly states when to commit versus withdraw, what commit checks against ('your wallet's fresh NET balance less everything it already stands behind'), and the explicit next step ('call submit_net_envelope within 5 minutes'). It also warns it is not an offer on any job. It does not distinguish when to use this envelope versus the other prepare_net_* primitives, but the commit/withdraw guidance is solid.

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