/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { powerPathLessonPlansGetTree } from "../../funcs/powerPathLessonPlansGetTree.js";
import * as operations from "../../models/operations/index.js";
import { formatResult } from "../tools.js";
const args = {
    request: operations.GetTreeRequest$inboundSchema,
};
export const tool$powerPathLessonPlansGetTree = {
    name: "power-path-lesson-plans-get-tree",
    description: `Returns the lesson plan tree for a course and student


    Given a course sourced ID and a user sourced ID, returns the lesson plan tree.

    The lesson plan tree is nested object comprised of several lessonPlanItems, 
    which are nodes that contain information about the lesson plan - including which component or component resource is associated with that node, 
    as well as which node is its parent.

    A node may reference a component or a componentResource.
    A node with no parent is considered at the root level of the lesson plan tree.

    A student's lesson plan has a unique ID that can be used instead of the parameters to retrieve it.
    `,
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await powerPathLessonPlansGetTree(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=powerPathLessonPlansGetTree.js.map