Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
RPC_URLNoA custom RPC endpoint for sending on-chain transactions (e.g. `reveal`).chain's public RPC
PRIVATE_KEYYesYour wallet private key — 0x followed by 64 hex chars (32 bytes).

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
authenticateA

Create a blockchain session. Call this tool when other tools fail with authentication or session errors (e.g. "not authenticated", "session expired"). In EVM mode this signs in via SIWE locally and stores the token. In AGW mode it returns a URL the user must open in their browser to approve. Once authenticated, subsequent wallet-dependent tools will work automatically. Pass force=true to discard the cached session and authenticate from scratch (e.g. after the game backend was reset and the stored token references a stale user).

get_game_configA

Return the game rulebook for the active network: the resource catalog (id → name), building costs (extractor / hub), reveal-cost params (first reveal free; re-reveal price), the on-chain contract addresses, and the recipe count (use list_recipes for the full recipe graph). A free reference read — call it once to ground planning. No session needed.

get_mapA

Read the live game world. The map is loaded at startup and kept current in the background; this returns a snapshot of it on demand (you only see updates when you call a tool). The map is public — you can see every player. Resources live on cells. Always returns a "summary" (counts + freshness) and, when your wallet is known, a "resourceIndex" (resourceId → your cells holding it, with location). Cells come back as a graph: each carries axial x/y and "neighbors" (the 6 adjacent hexes, each owned/other/empty). Scopes: "mine" (your cells), "around" (cells within a hex radius — scout a region), "cells" (specific tokenIds), "all" (everything), "summary" (no cells). Default: "mine", else "summary". Note units: version/updated are epoch ms, serverTime/startAt are unix seconds, amounts are decimal strings.

get_cellA

Inspect a single cell in depth (any owner — the map is public). Returns the cell, its neighbours expanded as full cell states (not just refs, so you see the immediate surroundings of a target), and the hex distance to your nearest cell (null if your wallet is unknown). Use this to study a specific target; use get_map for broader situational awareness.

get_changesA

Get only the cells that changed since a given version — react to other players without re-reading the whole map. Workflow: take "version" from a previous map response, remember it, and pass it back here next time; the response carries a new "version" to use on the following call. Omit sinceVersion (or pass 0) to get everything.

revealA

Reveal the resource deposits of a Land cell you own. Requires a session — call authenticate first. The first reveal of a cell is free; re-revealing a depleted cell has a $CPU cost, which this tool auto-approves once (a one-time unbounded allowance) before revealing. It submits an on-chain transaction and waits for its confirmation, then reports the transaction hash. The revealed resources are applied a few seconds later by the indexer — read them with get_cell once settled.

buildA

Place a building on a revealed Land cell you own. Requires a session — call authenticate first. Two types: extractor (mines a resource deposit — pass the targetResourceId of a resource that has an active deposit on the cell) and hub (trade — pass targetResourceId: null). Build always costs $CPU, which this tool auto-approves once (a one-time unbounded allowance) before submitting the on-chain payment and waiting for its confirmation. The building is applied by the indexer a few seconds later; an extractor then starts mining automatically — track it with get_mining_status. Inspect the cell with get_cell.

list_recipesA

List the craft recipes available in the game: each recipe’s inputs, outputs, duration per batch and $CPU cost. Public — no session needed. Use it before craft to pick a recipe and see what a paid forge will cost up front.

craftA

Run a craft recipe on a cell you own (refine raw resources, or forge $WCPU). Requires a session — call authenticate first; discover recipes with list_recipes. Inputs are debited upfront for all batches. Most recipes are free and start their timer immediately; forge_wcpu costs $CPU, which this tool auto-approves once (a one-time unbounded allowance) before submitting the on-chain payment and waiting for its confirmation — its timer then starts once the indexer settles the payment a few seconds later. Track progress with get_craft_status and bank matured batches with claim_craft.

get_craft_statusA

Get the craft processes on a cell: each one’s recipe, status (active / pending payment), batches done, what is claimable right now, and when the next batch matures. Public — works for any tokenId. This is the source of craft progress; bank matured batches with claim_craft.

claim_craftA

Bank every matured craft batch on a cell you own into its resource balance. Requires a session — call authenticate first. Claiming with nothing matured is a no-op success; a fully-claimed process frees its slot. Check what is claimable first with get_craft_status.

get_mining_statusA

Read a cell's mining status: whether an extractor is active, which resource it mines, the accrued-but-unclaimed amount, and the remaining deposit. Public — works for any cell, no session required. The owner banks the accrued amount with claim_mining.

claim_miningA

Bank the resources an extractor has accrued on a cell you own into the cell balance. Requires a session — call authenticate first. Off-chain and free (no transaction); claiming with nothing accrued is a harmless no-op. Check what is available first with get_mining_status.

quote_transportA

Preview a transport route without committing: returns whether it is free or paid, the hop distance and travel time, and (for a paid route through a foreign Hub) the exact $CPU fee, burn, and per-hub payouts. It has no side effects — it does not escrow resources. It also validates the route, surfacing the rejection reason and hop index if the path is invalid. Use it before transport to decide.

transportA

Move a resource between cells along a waypoint chain. Requires a session — call authenticate first. A route over only your own cells is free and starts immediately; a route through a foreign Hub costs $CPU — this tool then auto-approves the $CPU spend once (a one-time unbounded allowance) and submits the on-chain payment, waiting for its confirmation. Preview the cost first with quote_transport. Returns the transport jobId — track the shipment with get_transport_status <jobId>. If the on-chain payment fails, the source resource stays escrowed and the action is resumable with resume_transport <jobId>.

list_my_transportsA

List your own transports (newest first), optionally filtered by status (in_transit, delivered, awaiting_payment, cancelled, reverted). Each entry includes live progress. Use this to monitor your shipments, or to recover a transport jobId you no longer have — the map does not carry jobIds.

get_transport_statusA

Get the live status of one transport by its jobId: lifecycle status, interpolated position, hops traveled, and ETA / arrival. Public — works for any jobId. This is the only source of a shipment live progress; the world map never carries shipments. As a secondary signal, a delivered shipment also bumps the target cell resource balance (visible via get_cell / get_changes).

get_pending_transportsA

List your paid transports awaiting on-chain payment — actions whose source resource is already escrowed and whose signature is still held server-side. Each entry shows the $CPU cost, deadline, and whether it is still resumable. Finish paying one with resume_transport <jobId>; an expired one is freed by re-initiating the same route with transport.

resume_transportA

Finish paying a pending paid transport (from get_pending_transports) by its jobId: it re-submits the already-issued signature on-chain (auto-approving $CPU first), without creating a new transport or re-escrowing. Safe to retry — it checks the signature deadline and the on-chain replay guard, and reports if the action is already paid or has expired.

get_marketsA

Scout the marketplace: one compact row per (Hub, resource) with open-vs-incoming lot counts, lowest price, and distance. The recommended first look at what is for sale and where — then drill into specific lots with list_lots. Public read; supports hub / resourceId filters and an optional zone (aroundTokenId or centerX/centerY + radius).

list_lotsA

Browse marketplace lots with filters (hub, resourceId, seller, minPrice/maxPrice), sort (price_asc | recent | nearest), pagination (limit ≤ 200, offset), and an optional zone (aroundTokenId or centerX/centerY + radius in hex steps). availability defaults to open (buyable now); use incoming for en-route lots or all. Public read — start with get_markets for a compact overview, then drill in here.

get_lotA

Inspect a single lot by id — resource, remaining/listed units, price per unit, Hub location, seller, and lifecycle state. Public read.

list_my_lotsA

List the lots you have created, across all lifecycle states (optionally filtered by state). Requires a session. Use this to find your lotIds and track create / cancel progress.

quote_buyA

Preview the cost of buying from a lot — non-destructive, reserves nothing. Requires a session. Pass chain = [hub, ...waypoints, your destination cell] for the exact total buy_lot would charge (seller price + transit fees + burn); omit it for a seller-only estimate (price × value). Use this before buy_lot, which reserves units immediately.

create_lotA

List units of a resource for sale at a Hub. Requires a session — call authenticate first. Transports the goods from your source cell to the listing Hub (chain = [source, ...waypoints, hub]) and opens a lot at pricePerUnit $CPU. A route over only your own cells is free and starts immediately; a route through a foreign Hub costs $CPU — this tool then auto-approves the $CPU spend once and submits the on-chain payment. Returns the lotId — track it with list_my_lots / get_lot.

buy_lotA

Buy units from an OPEN lot, delivered to your own cell. Requires a session. chain = [hub, ...waypoints, your destination cell] (the Hub holding the lot → your revealed cell). Always paid in $CPU (seller price + any foreign-hub transit fees) — auto-approves the spend once and submits the on-chain payment. NOTE: this reserves the units immediately (no dry-run) — preview the exact cost first with quote_buy. Track delivery with list_my_transports / get_lot.

cancel_lotA

Withdraw your lot; unsold units return to you. Requires a session. For an OPEN lot pass chain = [hub, ...waypoints, your destination cell] (the return shipment); omit chain only for a DRAFT lot (nothing has shipped yet). A return through a foreign Hub costs $CPU — auto-approved and paid on-chain — otherwise it is free. Track with list_my_lots / get_lot.

get_balanceA

Show the wallet's spendable funds: $CPU (the game currency — paid for reveal, build, craft, transport, and trade) and the native gas balance, each human-readable and in wei. Check this before paid actions to avoid failed or stranded payments. Requires a configured wallet (no session needed).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sodiqit/cpu-game-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server