/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 7e648dd5786c
 */
import * as z from "zod";
import { usageGetUsage } from "../../funcs/usageGetUsage.js";
import { formatResult } from "../tools.js";
const args = {
    date: z.string().date().describe("The date for which to retrieve usage details (YYYY-MM-DD). If not specified, returns the current usage.").optional(),
};
export const tool$usageGetUsage = {
    name: "get-usage-details",
    description: `Retrieves comprehensive usage metrics and account statistics

A report on the status of product environment usage, including storage, credits, bandwidth, requests, number of resources, and add-on usage. No date parameter needed to get current usage statistics.`,
    scopes: ["admin"],
    annotations: {
        "title": "Get Usage Details",
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true,
    },
    args,
    tool: async (client, args, ctx) => {
        const [result] = await usageGetUsage(client, args.date, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        return formatResult(result.value);
    },
};
//# sourceMappingURL=usageGetUsage.js.map