/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { accessTokensIssueAccessToken } from "../../funcs/accessTokensIssueAccessToken.js";
import * as components from "../../models/components/index.js";
import { formatResult } from "../tools.js";
const args = {
    request: components.AccessTokenInfo$inboundSchema,
};
export const tool$accessTokensIssueAccessToken = {
    name: "access-tokens-issue-access-token",
    description: `Issue a new access token.`,
    scopes: ["write", "write", "write"],
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await accessTokensIssueAccessToken(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        const value = result.value;
        return formatResult(value, apiCall);
    },
};
//# sourceMappingURL=accessTokensIssueAccessToken.js.map