Skip to main content
Glama

get_custom_object_by_object_slug

Read-onlyIdempotent

Retrieve a custom object from Eduframe by its object slug. Returns the object's full data.

Instructions

Get a custom object by the object slug

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the custom object to retrieve

Implementation Reference

  • The handler function for the 'get_custom_object_by_object_slug' tool. Registered via server.registerTool with inputSchema expecting an 'id' (number). However, the API call uses ${object_slug} (an undefined variable) instead of the destructured 'id', which is likely a bug.
    server.registerTool(
      "get_custom_object_by_object_slug",
      {
        description: "Get a custom object by the object slug",
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the custom object to retrieve") },
      },
      async ({ id }) => {
        try {
          const record = await apiGet<EduframeRecord>(`/custom/objects/${object_slug}`);
          void logResponse("get_custom_object_by_object_slug", { id }, record);
          return formatShow(record, "custom object");
        } catch (error) {
          return formatError(error);
        }
      },
  • Input schema defined inline in the tool registration. Expects a single parameter 'id' (z.number().int().positive()) described as 'ID of the custom object to retrieve'.
    {
      description: "Get a custom object by the object slug",
      annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
      inputSchema: { id: z.number().int().positive().describe("ID of the custom object to retrieve") },
    },
  • The tool is registered inside the registerCustomObjectTools function, which is exported from src/tools/custom_objects.ts. This function is imported and invoked in src/tools/index.ts.
    export function registerCustomObjectTools(server: McpServer): void {
      server.registerTool(
        "get_custom_objects",
        {
          description: "Get all custom objects",
          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>("/custom/objects", { cursor, per_page });
            void logResponse("get_custom_objects", { cursor, per_page }, result);
            const toolResult = formatList(result.records, "custom objects");
            if (result.nextCursor) {
              toolResult.content.push({ type: "text", text: `\nNext page cursor: ${result.nextCursor}` });
            }
            return toolResult;
          } catch (error) {
            return formatError(error);
          }
        },
      );
    
      server.registerTool(
        "get_custom_object_by_object_slug",
        {
          description: "Get a custom object by the object slug",
          annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
          inputSchema: { id: z.number().int().positive().describe("ID of the custom object to retrieve") },
        },
        async ({ id }) => {
          try {
            const record = await apiGet<EduframeRecord>(`/custom/objects/${object_slug}`);
            void logResponse("get_custom_object_by_object_slug", { id }, record);
            return formatShow(record, "custom object");
          } catch (error) {
            return formatError(error);
          }
        },
      );
  • Import of registerCustomObjectTools from ./custom_objects and its inclusion in the tools array at line 82, which is iterated over by registerAllTools.
    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,
      registerCourseTools,
      registerCreditCategorieTools,
      registerCreditTools,
      registerCustomAssociationTools,
      registerCustomFieldOptionTools,
      registerCustomObjectTools,
      registerCustomRecordTools,
      registerDiscountCodeTools,
      registerEditionDescriptionSectionTools,
      registerEducatorTools,
      registerEmailTools,
      registerEnrollmentTools,
      registerGradeTools,
      registerInvoiceVatTools,
      registerInvoiceTools,
      registerLabelTools,
      registerLeadTools,
      registerMaterialGroupTools,
      registerMaterialTools,
      registerMeetingLocationTools,
      registerMeetingTools,
      registerOrderTools,
      registerOrganizationTools,
      registerPaymentMethodTools,
      registerPaymentOptionTools,
      registerPaymentTools,
      registerPlannedCourseTools,
      registerPlanningAttendeeTools,
      registerPlanningConflictTools,
      registerPlanningEventTools,
      registerPlanningLocationTools,
      registerPlanningMaterialTools,
      registerPlanningRequiredTeacherGroupAttendeeTools,
      registerPlanningTeacherTools,
      registerProgramEditionTools,
      registerProgramElementTools,
      registerProgramEnrollmentTools,
      registerProgramPersonalProgramElementTools,
      registerProgramProgramTools,
      registerReferralTools,
      registerSignupQuestionTools,
      registerTaskTools,
      registerTeacherEnrollmentTools,
      registerTeacherRoleTools,
      registerTeacherTools,
      registerTheseTools,
      registerUserTools,
      registerWebhookNotificationTools,
      registerWebhookTools,
    ];
Behavior3/5

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

Annotations already indicate readOnlyHint=true, destructiveHint=false, idempotentHint=true, so the tool is safely read-only. The description adds no behavioral detail beyond that, which is adequate but not exceptional.

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

Conciseness2/5

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

A single sentence, but it is misleading. Conciseness is wasted if the content is inaccurate. The structure is poor because it fails to align with the schema.

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 the many sibling tools for custom objects, the description is incomplete. It does not differentiate itself or explain the type of custom object being retrieved.

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

Parameters2/5

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

Despite 100% schema coverage, the description contradicts the parameter by mentioning 'slug' while the schema expects an integer 'id'. The description adds no value and causes confusion.

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

Purpose2/5

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

The description states 'Get a custom object by the object slug', but the input schema requires an integer 'id', not a slug. This mismatch between name/description and schema undermines clarity and could mislead the agent.

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?

No guidance on when to use this tool versus sibling tools like 'get_custom_record' or 'get_custom_objects'. The description lacks context for selection.

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