Skip to main content
Glama

get_course_tabs

Read-onlyIdempotent

Retrieve all course tab records with pagination. Use cursor for next page and per_page to limit results.

Instructions

Get all course tab records

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoCursor for fetching the next page of results
per_pageNoNumber of results per page (default: 25)

Implementation Reference

  • The registerCourseTabTools function registers the 'get_course_tabs' tool on the MCP server. The handler (lines 18-30) calls apiList<EduframeRecord>('/course_tabs', ...) to fetch paginated course tab records from the Eduframe API, logs the response, formats the result, and returns it with an optional next cursor.
    export function registerCourseTabTools(server: McpServer): void {
      server.registerTool(
        "get_course_tabs",
        {
          description: "Get all course tab records",
          annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
          inputSchema: {
            cursor: z.string().optional().describe("Cursor for fetching the next page of results"),
            per_page: z.number().int().positive().optional().describe("Number of results per page (default: 25)"),
          },
        },
        async ({ cursor, per_page }) => {
          try {
            const result = await apiList<EduframeRecord>("/course_tabs", { cursor, per_page });
            void logResponse("get_course_tabs", { cursor, per_page }, result);
            const toolResult = formatList(result.records, "course tabs");
            if (result.nextCursor) {
              toolResult.content.push({ type: "text", text: `\nNext page cursor: ${result.nextCursor}` });
            }
            return toolResult;
          } catch (error) {
            return formatError(error);
          }
        },
      );
    }
  • Input schema for 'get_course_tabs' tool: defines optional 'cursor' (string, for pagination) and 'per_page' (positive integer, default 25) parameters using Zod.
    {
      description: "Get all course tab records",
      annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
      inputSchema: {
        cursor: z.string().optional().describe("Cursor for fetching the next page of results"),
        per_page: z.number().int().positive().optional().describe("Number of results per page (default: 25)"),
      },
  • Registration of the tool via server.registerTool() with the name 'get_course_tabs', description, annotations (readOnlyHint: true), input schema, and handler callback.
    server.registerTool(
      "get_course_tabs",
      {
        description: "Get all course tab records",
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
        inputSchema: {
          cursor: z.string().optional().describe("Cursor for fetching the next page of results"),
          per_page: z.number().int().positive().optional().describe("Number of results per page (default: 25)"),
        },
      },
      async ({ cursor, per_page }) => {
        try {
          const result = await apiList<EduframeRecord>("/course_tabs", { cursor, per_page });
          void logResponse("get_course_tabs", { cursor, per_page }, result);
          const toolResult = formatList(result.records, "course tabs");
          if (result.nextCursor) {
            toolResult.content.push({ type: "text", text: `\nNext page cursor: ${result.nextCursor}` });
          }
          return toolResult;
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Import and inclusion of registerCourseTabTools in the tools array (line 75) which gets called by registerAllTools to register all tools on the MCP server.
    import { registerCourseTabTools } from "./course_tabs";
    import { registerCourseVariantTools } from "./course_variants";
    import { registerCourseTools } from "./courses";
    import { registerCreditCategorieTools } from "./credit_categories";
    import { registerCreditTools } from "./credits";
    import { registerCustomAssociationTools } from "./custom_associations";
    import { registerCustomFieldOptionTools } from "./custom_field_options";
    import { registerCustomObjectTools } from "./custom_objects";
    import { registerCustomRecordTools } from "./custom_records";
    import { registerDiscountCodeTools } from "./discount_codes";
    import { registerEditionDescriptionSectionTools } from "./edition_description_sections";
    import { registerEducatorTools } from "./educators";
    import { registerEmailTools } from "./emails";
    import { registerEnrollmentTools } from "./enrollments";
    import { registerGradeTools } from "./grades";
    import { registerInvoiceVatTools } from "./invoice_vats";
    import { registerInvoiceTools } from "./invoices";
    import { registerLabelTools } from "./labels";
    import { registerLeadTools } from "./leads";
    import { registerMaterialGroupTools } from "./material_groups";
    import { registerMaterialTools } from "./materials";
    import { registerMeetingLocationTools } from "./meeting_locations";
    import { registerMeetingTools } from "./meetings";
    import { registerOrderTools } from "./orders";
    import { registerOrganizationTools } from "./organizations";
    import { registerPaymentMethodTools } from "./payment_methods";
    import { registerPaymentOptionTools } from "./payment_options";
    import { registerPaymentTools } from "./payments";
    import { registerPlannedCourseTools } from "./planned_courses";
    import { registerPlanningAttendeeTools } from "./planning_attendees";
    import { registerPlanningConflictTools } from "./planning_conflicts";
    import { registerPlanningEventTools } from "./planning_events";
    import { registerPlanningLocationTools } from "./planning_locations";
    import { registerPlanningMaterialTools } from "./planning_materials";
    import { registerPlanningRequiredTeacherGroupAttendeeTools } from "./planning_required_teacher_group_attendees";
    import { registerPlanningTeacherTools } from "./planning_teachers";
    import { registerProgramEditionTools } from "./program_editions";
    import { registerProgramElementTools } from "./program_elements";
    import { registerProgramEnrollmentTools } from "./program_enrollments";
    import { registerProgramPersonalProgramElementTools } from "./program_personal_program_elements";
    import { registerProgramProgramTools } from "./program_programs";
    import { registerReferralTools } from "./referrals";
    import { registerSignupQuestionTools } from "./signup_questions";
    import { registerTaskTools } from "./tasks";
    import { registerTeacherEnrollmentTools } from "./teacher_enrollments";
    import { registerTeacherRoleTools } from "./teacher_roles";
    import { registerTeacherTools } from "./teachers";
    import { registerTheseTools } from "./theses";
    import { registerUserTools } from "./users";
    import { registerWebhookNotificationTools } from "./webhook_notifications";
    import { registerWebhookTools } from "./webhooks";
    
    const tools: Array<(server: McpServer) => void> = [
      registerAccountTools,
      registerAffiliationTools,
      registerAttendanceTools,
      registerAuthenticationTools,
      registerCatalogProductTools,
      registerCatalogVariantTools,
      registerCategorieTools,
      registerCertificateTools,
      registerCommentTools,
      registerCourseLocationTools,
      registerCourseTabTools,
      registerCourseVariantTools,
  • The apiList<T>() helper function used by the handler: performs a GET request to the Eduframe API, parses paginated JSON results and extracts the next cursor from the Link header.
    export async function apiList<T>(path: string, query?: Record<string, QueryValue>): Promise<ListResult<T>> {
      const { token } = getConfig();
      const url = buildUrl(path, query);
    
      const response = await fetch(url.toString(), {
        method: "GET",
        headers: buildHeaders(token),
      });
    
      await checkResponse(response);
    
      const records = (await response.json()) as T[];
      const nextCursor = parseNextCursor(response.headers.get("Link"));
    
      return { records, nextCursor };
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description does not add further behavioral context (e.g., pagination, rate limits, or return format), which is acceptable but not additive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that directly states the tool's purpose. It is front-loaded and contains no extraneous information, though it could benefit from mentioning pagination.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description should provide more context about what a 'course tab record' is and that results are paginated. The tool has pagination parameters but the description omits this, leaving potential confusion for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters (cursor, per_page) are fully documented in the input schema with 100% coverage. The description adds no additional meaning beyond the schema, meeting the baseline expectation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (Get) and the resource (all course tab records). It is specific enough to distinguish from other get_* tools, though the term 'course tab records' is somewhat vague without further context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or contextual boundaries. Given many sibling get_* tools, explicit usage context would be valuable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/martijnpieters/eduframe-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server