exergynet_estimate_gate
Calculate exergy-gate profitability for autonomous agent settlements using external compute cost and settlement cost, with an optional risk margin.
Instructions
Calculate exergy-gate profitability.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| externalComputeCostUsd | Yes | ||
| settlementCostUsd | Yes | ||
| riskMarginUsd | No |
Implementation Reference
- src/index.ts:49-62 (handler)Handler function that executes the exergynet_estimate_gate tool logic. It computes external compute cost minus settlement cost and risk margin to determine if using ExergyNet is profitable.
case "exergynet_estimate_gate": { // Corrected Math Evaluation Matrix const extCost = Number(args.externalComputeCostUsd) || 0; const setCost = Number(args.settlementCostUsd) || 0; const margin = Number(args.riskMarginUsd) || 0; const totalCost = setCost + margin; if (extCost > totalCost) { return { content:[{ type: "text", text: `ACTION: USE_EXERGYNET (Margin: ${(extCost - totalCost).toFixed(2)})` }] }; } else { return { content:[{ type: "text", text: `REJECT: Below threshold. (Deficit: ${(totalCost - extCost).toFixed(2)})` }] }; } } - src/index.ts:22-34 (schema)Input schema for the exergynet_estimate_gate tool. Defines required fields: externalComputeCostUsd, settlementCostUsd, and optional riskMarginUsd, all of type number.
{ name: "exergynet_estimate_gate", description: "Calculate exergy-gate profitability.", inputSchema: { type: "object", required:["externalComputeCostUsd", "settlementCostUsd"], properties: { externalComputeCostUsd: { type: "number" }, settlementCostUsd: { type: "number" }, riskMarginUsd: { type: "number" } } } } - src/index.ts:17-36 (registration)Registration of the tool via ListToolsRequestSchema handler. The tool named 'exergynet_estimate_gate' is listed alongside other tools.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools:[ { name: "exergynet_get_program_id", description: "Return the Mainnet LNES-01 program ID.", inputSchema: { type: "object", properties: {} } }, { name: "exergynet_verify_program", description: "Check if LNES-01 is live on Mainnet.", inputSchema: { type: "object", properties: { rpcUrl: { type: "string" } }, additionalProperties: false } }, { name: "exergynet_get_proof_transaction", description: "Return the proven SettleExergy transaction signature.", inputSchema: { type: "object", properties: {} } }, { name: "exergynet_estimate_gate", description: "Calculate exergy-gate profitability.", inputSchema: { type: "object", required:["externalComputeCostUsd", "settlementCostUsd"], properties: { externalComputeCostUsd: { type: "number" }, settlementCostUsd: { type: "number" }, riskMarginUsd: { type: "number" } } } } ] }));