delete_option_of_custom_field
Delete a specific option from a custom field by providing the parent resource ID, field slug, and option ID.
Instructions
Delete an option from custom field
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| object_type | Yes | ID of the parent resource | |
| field_slug | Yes | ID of the parent resource | |
| id | Yes | ID of the custom field option to delete |
Implementation Reference
- src/tools/custom_field_options.ts:98-108 (handler)Handler function that executes the delete_option_of_custom_field tool logic. Calls apiDelete on `/custom/${object_type}/fields/${field_slug}/options/${option_id}`.
async ({ object_type, field_slug, id }) => { try { const record = await apiDelete<EduframeRecord>( `/custom/${object_type}/fields/${field_slug}/options/${option_id}`, ); void logResponse("delete_option_of_custom_field", { object_type, field_slug, id }, record); return formatDelete(record, "custom field option"); } catch (error) { return formatError(error); } }, - Input schema for the delete_option_of_custom_field tool. Expects object_type, field_slug, and id (all positive integers).
inputSchema: { object_type: z.number().int().positive().describe("ID of the parent resource"), field_slug: z.number().int().positive().describe("ID of the parent resource"), id: z.number().int().positive().describe("ID of the custom field option to delete"), }, - src/tools/custom_field_options.ts:87-109 (registration)Registration of the tool via server.registerTool('delete_option_of_custom_field', ...) inside registerCustomFieldOptionTools.
server.registerTool( "delete_option_of_custom_field", { description: "Delete an option from custom field", annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true }, inputSchema: { object_type: z.number().int().positive().describe("ID of the parent resource"), field_slug: z.number().int().positive().describe("ID of the parent resource"), id: z.number().int().positive().describe("ID of the custom field option to delete"), }, }, async ({ object_type, field_slug, id }) => { try { const record = await apiDelete<EduframeRecord>( `/custom/${object_type}/fields/${field_slug}/options/${option_id}`, ); void logResponse("delete_option_of_custom_field", { object_type, field_slug, id }, record); return formatDelete(record, "custom field option"); } catch (error) { return formatError(error); } }, ); - src/tools/index.ts:128-132 (registration)registerAllTools iterates all tool registrations, including registerCustomFieldOptionTools which registers this tool.
export function registerAllTools(server: McpServer): void { for (const register of tools) { register(server); } }