get_custom_objects
Retrieve custom objects from Eduframe with pagination. Specify cursor for next page and per_page to control results per page.
Instructions
Get all custom objects
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Cursor for fetching the next page of results | |
| per_page | No | Number of results per page (default: 25) |
Implementation Reference
- src/tools/custom_objects.ts:7-31 (handler)The handler function and registration for the 'get_custom_objects' tool. It registers the tool with schema (cursor, per_page input), calls apiList on /custom/objects, formats results with formatList, and appends nextCursor if present.
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); } }, ); - src/tools/custom_objects.ts:7-31 (schema)Input schema defined inline in the registration call: cursor (optional string) and per_page (optional positive integer) for pagination.
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); } }, ); - src/tools/custom_objects.ts:7-31 (registration)Registered via server.registerTool('get_custom_objects', ...) inside the registerCustomObjectTools function.
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); } }, ); - src/tools/index.ts:19-19 (registration)Import of registerCustomObjectTools from ./custom_objects, which is later called in registerAllTools.
import { registerCustomObjectTools } from "./custom_objects"; - src/tools/index.ts:82-82 (registration)registerCustomObjectTools is included in the tools array, invoked by registerAllTools to register all tools on the MCP server.
registerCustomObjectTools,