get_planning_conflicts
Fetch paginated planning conflicts to identify scheduling clashes and resolve resource allocation issues.
Instructions
Get all conflicts
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_conflicts.ts:18-30 (handler)The async handler function that executes the get_planning_conflicts tool logic. Calls the Eduframe API at /planning/conflicts with optional cursor and per_page parameters, formats the response, and returns paginated results.
async ({ cursor, per_page }) => { try { const result = await apiList<EduframeRecord>("/planning/conflicts", { cursor, per_page }); void logResponse("get_planning_conflicts", { cursor, per_page }, result); const toolResult = formatList(result.records, "planning conflicts"); 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_planning_conflicts tool. Accepts optional 'cursor' (string) and 'per_page' (positive integer) parameters using Zod validation.
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_conflicts.ts:7-31 (registration)Registration of the get_planning_conflicts tool with the MCP server via server.registerTool(). Includes description, readOnlyHint, destructiveHint, and idempotentHint annotations.
export function registerPlanningConflictTools(server: McpServer): void { server.registerTool( "get_planning_conflicts", { description: "Get all conflicts", 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/conflicts", { cursor, per_page }); void logResponse("get_planning_conflicts", { cursor, per_page }, result); const toolResult = formatList(result.records, "planning conflicts"); 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:42-42 (registration)Import of registerPlanningConflictTools in the main tools index file that aggregates all tool registrations.
import { registerPlanningConflictTools } from "./planning_conflicts"; - src/tools/index.ts:105-105 (registration)Registration call for planning conflict tools in the array of all tool registrations, invoked in registerAllTools.
registerPlanningConflictTools,