Unofficial all-in-one CLI + MCP server for the NEAR stack — one NEAR account, every chain (Bitcoin, Ethereum, Polygon, Arbitrum, Base, Solana) via Chain Signatures + NEAR Intents.
near-hydra demonstrates solid tool design with explicit schemas for all 21 tools, consistent naming patterns, and generally good descriptions. All tools are registered with clear input schemas using Zod validation. However, several tools have overly long or example-heavy descriptions that violate LLM-optimization guidelines. Tool descriptions average ~220 characters (baseline p90=392, but many exceed 400 chars with embedded examples). Parameter descriptions are present and mostly well-written. Error handling uses consistent fail() wrapper but lacks recovery guidance. Output schemas are not explicitly documented in the code. Schema quality is strong (all 21 tools have explicit Zod schemas), but composition and chain-ability across tools has minor gaps (e.g., hydra_swap_quote and hydra_swap_execute both exist, creating potential duplication; hydra_ensure_gas and hydra_swap_execute overlap in intent).
For a NEAR account, derive its addresses on every supported foreign chain and return all native-asset balances in one call. Errors on individual chains are reported per-chain — partial success is normal.
View a NEAR account's on-chain state: balance (total/available/locked/storage), storage usage, code hash. Example: hydra_account_view({accountId: 'near.near'}).
Get the native-asset balance of an address on a foreign chain.
Derive a foreign-chain address (Bitcoin, EVM, Solana) from a NEAR account using Chain Signatures (MPC). Same NEAR account + path → same address every time. Supported chains: ethereum, polygon, arbitrum, base, optimism, bnb, avalanche, aurora, bitcoin, solana. Example: hydra_address_derive({chain: 'bitcoin', predecessor: 'alice.near'}) → bc1q....
Show the active near-hydra configuration: network, account, MPC contract, RPC endpoints. Read-only.
Description bloat: hydra_swap_quote description contains 500+ characters with embedded example object. LLM optimization baseline recommends 10-200 characters; baseline p90=392. Examples in descriptions often cause LLMs to reuse values literally.
Missing explicit output schema documentation. While Zod schemas validate inputs, the code does not document what fields tools return (e.g., hydra_account_view response fields: balance, storage_usage, code_hash). LLMs need this to plan downstream calls.
Error responses lack recovery guidance. All errors use generic fail() wrapper returning {error: message}. Per pattern, errors should classify as retryable/user-fixable/fatal and suggest next steps (e.g., 'Account not found. Try hydra_account_view() with a valid NEAR account ID.').
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | B | 71 | 2026-07-28+ | v2 |
Call a mutable method on a NEAR smart contract. SAFE BY DEFAULT: dry=true shows the plan; set dry=false to broadcast. Requires policy.readOnly=false and a configured signer.
Call a read-only view method on a NEAR smart contract. Returns parsed JSON when possible. Example: hydra_contract_view({contractId: 'wrap.near', method: 'ft_balance_of', args: {account_id: 'alice.near'}}).
Create (and optionally register) fresh access keys for an AI agent to call specific smart contracts. Each key is scoped to a contract and method list, and capped by an allowance. Keys are returned in the response and NOT persisted by near-hydra — save them immediately. dry=true by default.
Ensure a derived address has enough native gas on a foreign chain. If gas is below the minimum, automatically initiates a 1Click swap to top it up (requires NEAR funds in the configured account). Returns the final balance after topping up. dry=true by default.
Send BTC via Chain Signatures from your derived Bitcoin address. SAFE BY DEFAULT: dry=true. Example: hydra_send_btc({to: 'bc1q...', satoshi: '50000'}).
Send a native EVM coin or ERC-20 token via Chain Signatures from your derived EVM address. Supported chains: ethereum, polygon, arbitrum, base, optimism, bnb, avalanche, aurora. SAFE BY DEFAULT: dry=true. If token is null/omitted, sends native coin. Otherwise sends an ERC-20 token; you must know its contract address and decimals.
Send a NEP-141 fungible token from the configured account. Calls ft_transfer with 1 yoctoNEAR deposit. SAFE: dry=true by default. Example: send wNEAR via tokenContract='wrap.near'.
Send native NEAR from the configured account. SAFE BY DEFAULT: dry=true returns the plan without broadcasting. Set dry=false to actually send. Requires policy.readOnly=false. amountYocto is in yocto (1 NEAR = 10^24 yocto).
Send SOL via Chain Signatures from your derived Solana address. SAFE BY DEFAULT: dry=true.
Send a Solana SPL token via Chain Signatures from your derived Solana address. Auto-creates the recipient's Associated Token Account (ATA) if it does not exist. SAFE BY DEFAULT: dry=true.
Sign an arbitrary message with the configured NEAR signer. Returns signature in 'ed25519:<base64>' format. Useful for proving ownership or authentication.
Execute a manual cross-chain swap: get a quote, broadcast the deposit, and poll for completion. Handles dry runs, error recovery, and retries. Requires policy.readOnly=false and a configured NEAR signer.
Get a NEAR Intents 1Click cross-chain swap quote. Set dry=true to simulate (no deposit address); dry=false returns a deposit address you must send the input asset to. Asset IDs come from hydra_swap_tokens. Example: hydra_swap_quote({originAsset: 'nep141:wrap.near', destinationAsset: 'nep141:eth.bridge.near', amount: '1000000000000000000000000', recipient: '0x...', refundTo: 'alice.near', refundType: 'INTENTS', recipientType: 'DESTINATION_CHAIN', swapType: 'EXACT_INPUT', slippageTolerance: 100, depositType: 'INTENTS'}).
Check the execution status of a 1Click swap by its deposit address.
Notify 1Click that the deposit transaction has been broadcast. depositAddress comes from a non-dry quote; txHash is the transaction hash on the chain you sent funds on.
List all tokens supported by NEAR Intents 1Click for cross-chain swaps. Each entry includes assetId, blockchain, contractAddress, symbol, decimals, USD price.
Tool composition overlap: hydra_swap_quote (dry-run only) + hydra_swap_status (check status) + hydra_swap_submit_deposit (notify deposit) + hydra_swap_execute (orchestrates all three) creates cognitive load. Agent must decide whether to call quote then execute, or the lower-level primitives. Document when each is preferred.
Mutually exclusive parameters not documented. hydra_send_evm has 'token' and 'tokenDecimals' where decimals is required IF token is set, but this dependency is not stated in parameter descriptions. Same issue in hydra_send_spl with optional 'decimals'.
Dry-run defaults are safe (dry=true) but some tools omit explicit mention in description. Tools like hydra_send_near, hydra_send_ft, hydra_contract_call document this clearly, but hydra_ensure_gas and hydra_swap_execute bury it. Consistency matters for LLM reasoning.