{"uid":"cap_LNQu_eEvROT7-TsclTSG_","slug":"delx-array-last-4896b19e","name":"Delx Array Last","description":"Return the last list element. Call when you need tail of an agent-held array safely. Returns value and empty flag for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.","url":"https://api.delx.ai/api/v1/x402/arr-last","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"items":{"type":"array","description":"Input field: items."}}},"responseSchema":{"type":"json","example":{"empty":false,"value":"gamma","schema":"delx/util-arr-last/v1"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GXfNE7fOwHAqSdrhUrVE_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the last element of an input array along with an empty flag, with no data retention.","exampleAgentPrompt":"I have the array [10, 20, 30, 40, 50] — can you get me the last element from it and let me know if the list was empty?","exampleUseCases":[{"title":"Tail check in pipeline processing","prompt":"I'm processing a queue and need the last item from this list [\"task-a\", \"task-b\", \"task-c\"] — grab it for me and tell me if the list was empty."},{"title":"Most recent log entry retrieval","prompt":"Here's a list of log entries: [\"error at 09:00\", \"warning at 09:15\", \"info at 09:30\"] — what's the last one, and was the list empty?"},{"title":"Final result extraction from agent output","prompt":"My agent just produced this result list: [42, 87, 13, 99] — I need the last value from it to decide the next step, and also confirm the array wasn't empty."}],"resultDescription":"Returns the last element of the provided array (its value) and a boolean empty flag indicating whether the input array was empty. No data is retained after the call.","failureModes":["Empty array input — returns empty flag as true with no value","Malformed or missing 'items' field — likely returns a validation error","Non-array type passed as items — may result in a schema error","Network timeout — transient failure with no side effects","Payment failure via x402 — call is rejected before processing"],"whenToPreferThis":"Choose this endpoint when an agent needs to safely retrieve the last element of an array it holds in memory, especially when you also need an explicit empty-array signal without writing conditional logic. Prefer it over manual index arithmetic when operating in a microservice or agentic pipeline context where simplicity, no-retention guarantees, and a predictable cost ($0.001 USDC) matter. Not appropriate for sorting, searching, or multi-element slicing operations.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:52:09.588Z","isFirstParty":false}