/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { powerPathPlacementGetCurrentLevel } from "../../funcs/powerPathPlacementGetCurrentLevel.js";
import * as operations from "../../models/operations/index.js";
import { formatResult } from "../tools.js";
const args = {
    request: operations.GetCurrentLevelRequest$inboundSchema,
};
export const tool$powerPathPlacementGetCurrentLevel = {
    name: "power-path-placement-get-current-level",
    description: `Get current level

Returns the current level of the student in a placement process:
- The level is determined by the last completed placement test's grade level, starting from the lowest grade level available for the subject's placement tests.
- As the student completes placement tests and attains scores of 90 or greater, their level updates to the next level available for the subject.

Also returns the 'onboarded' boolean that indicates if the student completed the onboarding process for the subject:
- A 'onboarded = true' means they either completed and passed all placement tests or they have gotten a score smaller than 90 in the last completed placement test.
- A 'onboarded = false' means they haven't completed placement tests yet or have achieved a score of 90 or greater in the last completed placement test and there are more tests to take.
`,
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await powerPathPlacementGetCurrentLevel(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=powerPathPlacementGetCurrentLevel.js.map