delete_certificate_from_program_enrollment
Delete a certificate from a program enrollment by providing the enrollment ID.
Instructions
Deletes a certificate from a program enrollment
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of the program enrollment |
Implementation Reference
- src/tools/program_enrollments.ts:97-113 (registration)Registration of the 'delete_certificate_from_program_enrollment' tool via server.registerTool(). Defines description, annotations, inputSchema (id), and the async handler that calls apiPost on /program/enrollments/${id}/delete_certificate.
server.registerTool( "delete_certificate_from_program_enrollment", { description: "Deletes a certificate from a program enrollment", annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true }, inputSchema: { id: z.number().int().positive().describe("ID of the program enrollment") }, }, async ({ id }) => { try { const record = await apiPost<EduframeRecord>(`/program/enrollments/${id}/delete_certificate`, {}); void logResponse("delete_certificate_from_program_enrollment", { id }, record); return formatShow(record, "program enrollment"); } catch (error) { return formatError(error); } }, ); - src/tools/program_enrollments.ts:104-112 (handler)The handler async function that executes the tool logic: calls apiPost to the delete_certificate endpoint and returns the formatted record.
async ({ id }) => { try { const record = await apiPost<EduframeRecord>(`/program/enrollments/${id}/delete_certificate`, {}); void logResponse("delete_certificate_from_program_enrollment", { id }, record); return formatShow(record, "program enrollment"); } catch (error) { return formatError(error); } }, - Input schema definition for the tool: requires a single 'id' field (positive integer).
inputSchema: { id: z.number().int().positive().describe("ID of the program enrollment") }, },