get_planning_teachers
Retrieve a paginated list of all available teachers for planning and scheduling purposes.
Instructions
Get all teachers that are available
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/planning_teachers.ts:18-30 (handler)The async handler function for the 'get_planning_teachers' tool. It calls apiList('/planning/teachers', ...), logs the response, formats the result via formatList, and appends a next-cursor hint if pagination is used.
async ({ cursor, per_page }) => { try { const result = await apiList<EduframeRecord>("/planning/teachers", { cursor, per_page }); void logResponse("get_planning_teachers", { cursor, per_page }, result); const toolResult = formatList(result.records, "planning teachers"); if (result.nextCursor) { toolResult.content.push({ type: "text", text: `\nNext page cursor: ${result.nextCursor}` }); } return toolResult; } catch (error) { return formatError(error); } }, - src/tools/planning_teachers.ts:10-16 (schema)Input schema definition for 'get_planning_teachers'. Accepts optional 'cursor' (string) and 'per_page' (positive integer). Described as 'Get all teachers that are available' with readOnly/destructive/idempotent annotations.
{ description: "Get all teachers that are available", 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)"), }, - src/tools/planning_teachers.ts:7-32 (registration)Registration function 'registerPlanningTeacherTools' that calls server.registerTool('get_planning_teachers', ...). This is the complete tool registration block.
export function registerPlanningTeacherTools(server: McpServer): void { server.registerTool( "get_planning_teachers", { description: "Get all teachers that are available", 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>("/planning/teachers", { cursor, per_page }); void logResponse("get_planning_teachers", { cursor, per_page }, result); const toolResult = formatList(result.records, "planning teachers"); 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:47-47 (registration)Import of 'registerPlanningTeacherTools' from './planning_teachers' in the central tools index.
import { registerPlanningTeacherTools } from "./planning_teachers"; - src/tools/index.ts:110-110 (registration)The 'registerPlanningTeacherTools' is included in the tools array, which is iterated by 'registerAllTools' to register all tools on the server.
registerPlanningTeacherTools,