Skip to main content
Glama

delete_program_element

DestructiveIdempotent

Delete a program element by its unique ID. Removes the specified element from the system.

Instructions

Delete a element

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the program element to delete

Implementation Reference

  • The handler/registration for the delete_program_element tool. It calls apiDelete on /program/elements/{id}, logs the response, and formats the result using formatDelete.
    server.registerTool(
      "delete_program_element",
      {
        description: "Delete a element",
        annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the program element to delete") },
      },
      async ({ id }) => {
        try {
          const record = await apiDelete<EduframeRecord>(`/program/elements/${id}`);
          void logResponse("delete_program_element", { id }, record);
          return formatDelete(record, "program element");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Input schema for delete_program_element: requires a positive integer 'id'.
    annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
    inputSchema: { id: z.number().int().positive().describe("ID of the program element to delete") },
  • Import of registerProgramElementTools in the central tools index.
    import { registerCreditCategorieTools } from "./credit_categories";
    import { registerCreditTools } from "./credits";
    import { registerCustomAssociationTools } from "./custom_associations";
    import { registerCustomFieldOptionTools } from "./custom_field_options";
    import { registerCustomObjectTools } from "./custom_objects";
    import { registerCustomRecordTools } from "./custom_records";
    import { registerDiscountCodeTools } from "./discount_codes";
    import { registerEditionDescriptionSectionTools } from "./edition_description_sections";
    import { registerEducatorTools } from "./educators";
    import { registerEmailTools } from "./emails";
    import { registerEnrollmentTools } from "./enrollments";
    import { registerGradeTools } from "./grades";
    import { registerInvoiceVatTools } from "./invoice_vats";
    import { registerInvoiceTools } from "./invoices";
    import { registerLabelTools } from "./labels";
    import { registerLeadTools } from "./leads";
    import { registerMaterialGroupTools } from "./material_groups";
    import { registerMaterialTools } from "./materials";
    import { registerMeetingLocationTools } from "./meeting_locations";
    import { registerMeetingTools } from "./meetings";
    import { registerOrderTools } from "./orders";
    import { registerOrganizationTools } from "./organizations";
    import { registerPaymentMethodTools } from "./payment_methods";
    import { registerPaymentOptionTools } from "./payment_options";
    import { registerPaymentTools } from "./payments";
    import { registerPlannedCourseTools } from "./planned_courses";
    import { registerPlanningAttendeeTools } from "./planning_attendees";
    import { registerPlanningConflictTools } from "./planning_conflicts";
    import { registerPlanningEventTools } from "./planning_events";
    import { registerPlanningLocationTools } from "./planning_locations";
    import { registerPlanningMaterialTools } from "./planning_materials";
    import { registerPlanningRequiredTeacherGroupAttendeeTools } from "./planning_required_teacher_group_attendees";
    import { registerPlanningTeacherTools } from "./planning_teachers";
    import { registerProgramEditionTools } from "./program_editions";
    import { registerProgramElementTools } from "./program_elements";
  • Registration of registerProgramElementTools in the tools array, which is iterated by registerAllTools.
    registerProgramElementTools,
  • apiDelete helper function that performs a DELETE HTTP request, used by delete_program_element.
    export async function apiDelete<T>(path: string): Promise<T> {
      const { token } = getConfig();
      const url = buildUrl(path);
    
      const response = await fetch(url.toString(), {
        method: "DELETE",
        headers: buildHeaders(token),
      });
    
      return handleResponse<T>(response);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds no behavioral context beyond what annotations already state. Annotations indicate destructive and idempotent, but the description does not explain implications like cascading deletes or error responses.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

At three words, the description is underspecified. While concise, it sacrifices essential information and has a typo ('a element'). A properly structured description would include the noun and verb clearly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool is a mutating operation with no output schema, the description should provide more context about the deletion's permanence, prerequisites, or effects. The current version is insufficient for an agent to use safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for the single parameter 'id'. The description does not add extra meaning, but the schema already clearly documents the parameter. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Delete a element' is a near tautology of the tool name. It adds no specificity about what kind of element is deleted, and the grammatical error reduces clarity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus sibling delete tools (e.g., delete_program, delete_program_edition). The agent is left without context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/martijnpieters/eduframe-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server