Plant trees and generate a certificate¶
Footprint figures are illustrative estimates, not measurements of electricity consumption or actual emissions from AI infrastructure, and are not verified carbon-accounting data. Bloomy Earth always talks about climate contribution and responsibility — never about offsetting or neutralizing AI emissions.
Plants real trees against the connected Bloomy Earth account's Tree Credits and returns a public certificate link when the service issues one. The planting can be for the caller's own account or a gift to someone else. Every successful call spends Tree Credits.
What it does¶
plant_trees posts to POST /v1/trees with the signed-in account's own credentials and plants real trees. When projectId is omitted, Bloomy Earth auto-selects a reforestation project and charges one Tree Credit for each tree; naming a project plants on that project instead. Gift parameters add the recipient's name and email to the planting certificate and, when supplied, a personal message.
The call is a write action: it changes the account's credit balance and creates a planting record. It is also the reason the tool is gated twice — by the mcp:write scope and by the two-call confirmation floor described below.
When an agent reaches for it¶
- A user asks to plant trees, or to turn a footprint estimate into a climate contribution.
- A user wants to plant as a gift and name the recipient on the certificate.
- A user names a specific reforestation project rather than letting Bloomy Earth auto-select one.
- A user has just checked their Tree Credit balance and decided what to spend.
Inputs¶
| Name | Type | Required | Meaning |
|---|---|---|---|
trees |
integer, at least 1 | Yes | Number of trees to plant. |
projectId |
string | No | Reforestation project to plant on. Omit it to let Bloomy Earth auto-select one. |
sendEmail |
boolean | No — default true |
Whether a planting certificate email is sent. |
giftRecipientName |
string | No — required for a gift | Recipient name printed on the gift certificate. |
giftRecipientEmail |
string, email shape | No — required for a gift | Recipient email address for the gift certificate. |
giftMessage |
string, up to 500 characters | No | Optional personal message included with the gift. |
confirmationCode |
string | No | The one-time code returned by a first call. Omit it to request confirmation; pass it back with identical arguments to execute. |
A gift needs both giftRecipientName and giftRecipientEmail: supplying one without the other is rejected locally, before anything reaches the confirmation floor and before any credit is spent.
Output¶
A second call that redeems its code returns the planting result:
success— whether the API accepted the planting.certificateLink— the public planting certificate, when the service issues one.certificateId— the certificate's identifier, when one is returned.treesPlanted— how many trees the planting recorded.creditsUsedandcreditBalance— the Tree Credits this planting consumed and the balance afterwards.giftSentTo— the gift recipient, when the planting was a gift.projectInfo— the project the trees were planted on.
The text summary states the planted quantity, the credits used, the resulting balance and the certificate link. A first call, made without a code, returns the confirmation summary instead of a planting result — no result field is populated because nothing was planted.
Scope and confirmation¶
plant_trees requires mcp:write on the live token scope. A token without it is answered with guidance to re-authorize; that refusal happens before the confirmation floor, so a read-only token mints no code and spends nothing.
The confirmation floor is the same on every write tool:
- First call, no code. A call carrying the intended arguments and no
confirmationCodeexecutes nothing. It returns a one-time code plus a summary of exactly what the second call would do — the quantity, the project, any gift details and the account the credits come from. - Second call, identical arguments plus the code. Only this call spends. The arguments must match the first call exactly.
- Single use. The code works once, expires after about five minutes, and redeems only for the same account, client and argument set.
- Zero-spend outcomes. Declining the invitation, ignoring it, or letting the code expire spends nothing.
The host's own approval dialog sits above this floor and cannot remove it: a host that asks for confirmation adds a second checkpoint, while a host that asks for nothing still leaves the server floor in place.
Worked example¶
A user asks for five trees as a gift. The assistant walks the two calls in order:
- First call.
plant_treesis called withtrees: 5plus the gift recipient's name and email, and noconfirmationCode. Nothing is planted. The result is a confirmation summary naming the quantity, the certificate email setting, the gift recipient and the account the credits will come from, together with a one-time code. - Human confirmation. The assistant shows that summary and asks the user to confirm. The assistant never answers the confirmation on the user's behalf.
- Second call. Only after the user confirms,
plant_treesis called again with exactly the same arguments plus the returnedconfirmationCode. This call spends the credits and returns the certificate link, the planted quantity and the new balance. - Stopped short. If the user declines, or the code is left to expire, nothing is spent. A later attempt starts again at a first call with a fresh code.
The credit figures and certificate link in a real response belong to the reader's account; no value in this walk-through is a published figure.
Related¶
estimate_ai_footprint— the estimator, which spends nothing.offset_co2_by_tonne— the tonne-priced write action, which shares the same confirmation floor.get_credit_balance— read the balance before planting.- Capabilities overview — the whole shipped surface with kind and scope.