get_custom_object_by_object_slug
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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of the custom object to retrieve |
Implementation Reference
- src/tools/custom_objects.ts:33-48 (handler)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); } }, - src/tools/custom_objects.ts:35-39 (schema)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") }, }, - src/tools/custom_objects.ts:7-49 (registration)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); } }, ); - src/tools/index.ts:19-126 (registration)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, ];