Node.js client library and MCP server to buy Lightning Network liquidity through Amboss Magma
Magma MCP has a single tool 'buy_lightning_liquidity' with clear naming, comprehensive description, and well-structured input schema. The tool name starts with a verb ('buy') and clearly indicates the action. The description is detailed (387 chars, within baseline range of 34-392), explaining what the tool does, when to use it, and including use cases. All five parameters are typed and have descriptions. However, the tool lacks output schema documentation, the description mentions 'Returns: lightning_invoice' but the actual output structure is not formally documented in the code. Error handling returns structured JSON but lacks recovery guidance beyond a generic 'Tool execution failed' message. The tool follows most patterns but falls short of A-grade due to missing output schema and limited error recovery context.
Purchase inbound Lightning Network liquidity for a node via Amboss Magma. This tool opens a channel TO your node, giving you receiving capacity. The liquidity purchase requires a minimum of $5.00 (500 cents). Use this when you need to: - Increase your node's inbound liquidity - Accept Lightning payments - Open channels to your node Parameters: - connection_uri: Your node's connection string (either just pubkey or pubkey@host:port) Examples: - 024ae5a5f0b01850983009489ca89c85... (just pubkey) - [email protected]:9735 (with socket) - usd_cents: Dollar amount in cents (minimum 500 = $5.00) - redirect_url: Optional URL to redirect after payment - private_channel: Optional boolean to create a private channel (default: false) - rails_cluster_only: Optional boolean to source only from Rails cluster (default: false) Returns: - lightning_invoice: Lightning invoice to complete payment
Output schema not documented. The tool description mentions 'Returns: lightning_invoice: Lightning invoice to complete payment' but does not formally define the output structure, field types, or whether additional fields are included. LLMs cannot reliably extract the invoice or understand next steps.
Error handling provides no recovery guidance. When an error occurs, the tool returns a generic 'Tool execution failed' message with only the underlying error text. LLMs need to know if the error is retryable, requires user action, or is fatal. Current error responses do not categorize or guide next steps.
No dry-run or confirmation mechanism for destructive operation. The 'buy_lightning_liquidity' tool initiates a financial transaction (minimum $5.00). There is no preview, confirmation step, or ability to validate parameters before committing. Agents can accidentally purchase liquidity due to parameter misunderstanding.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 65 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 49 | - | v1 |
Input schema uses Zod validation objects in code but does not expose JSON Schema in the registration call. The 'inputSchema' object is passed to 'registerTool' as Zod schema (z.string().min(500)) rather than explicit JSON Schema with 'type', 'properties', 'required'. While the SDK may convert this internally, the code does not show validation constraints clearly. The schema shown in the evaluation header suggests proper JSON Schema is being generated, but code visibility of the actual schema registration is incomplete.