deactivate_teacher
Mark a teacher as inactive by providing their ID. Useful for managing teacher records when they leave or are no longer active.
Instructions
Mark teacher as inactive
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of the teacher |
Implementation Reference
- src/tools/teachers.ts:90-106 (handler)Registration and handler for the 'deactivate_teacher' tool. Calls apiPost to deactivate a teacher by ID and returns formatted result.
server.registerTool( "deactivate_teacher", { description: "Mark teacher as inactive", annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true }, inputSchema: { id: z.number().int().positive().describe("ID of the teacher") }, }, async ({ id }) => { try { const record = await apiPost<EduframeRecord>(`/teachers/${id}/deactivate`, {}); void logResponse("deactivate_teacher", { id }, record); return formatShow(record, "teacher"); } catch (error) { return formatError(error); } }, ); - src/tools/index.ts:128-130 (registration)Entry point: registerTeacherTools is called via registerAllTools loop to register the deactivate_teacher tool on the MCP server.
export function registerAllTools(server: McpServer): void { for (const register of tools) { register(server); - src/tools/teachers.ts:93-96 (schema)Input schema for deactivate_teacher: requires an integer id field.
description: "Mark teacher as inactive", annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true }, inputSchema: { id: z.number().int().positive().describe("ID of the teacher") }, },