delete_affiliation
Delete an affiliation record by specifying its ID to remove it from the system.
Instructions
Delete an affiliation
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "delete_affiliation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of the affiliation to delete |
Implementation Reference
- src/tools/affiliations.ts:93-102 (handler)Handler function for delete_affiliation tool. Calls apiDelete on /affiliations/{id}, logs the response, and formats the result using formatDelete.
async ({ id }) => { try { const record = await apiDelete<EduframeRecord>(`/affiliations/${id}`); void logResponse("delete_affiliation", { id }, record); return formatDelete(record, "affiliation"); } catch (error) { return formatError(error); } }, ); - src/tools/affiliations.ts:88-92 (schema)Input schema for delete_affiliation: requires a positive integer 'id' parameter. Marked as destructive and idempotent.
{ description: "Delete an affiliation", annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true }, inputSchema: { id: z.number().int().positive().describe("ID of the affiliation to delete") }, }, - src/tools/affiliations.ts:86-102 (registration)Registration of delete_affiliation tool on the MCP server via registerTool(). Registered inside registerAffiliationTools() which is exported from src/tools/affiliations.ts.
server.registerTool( "delete_affiliation", { description: "Delete an affiliation", annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true }, inputSchema: { id: z.number().int().positive().describe("ID of the affiliation to delete") }, }, async ({ id }) => { try { const record = await apiDelete<EduframeRecord>(`/affiliations/${id}`); void logResponse("delete_affiliation", { id }, record); return formatDelete(record, "affiliation"); } catch (error) { return formatError(error); } }, );