Skip to main content
Glama

delete_program_edition

DestructiveIdempotent

Remove a program edition from the system by providing its ID. This action permanently deletes the specified edition.

Instructions

Delete a program edition

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the program edition to delete

Implementation Reference

  • Handler registration for the 'delete_program_edition' tool. Registers the tool with server.registerTool, calling apiDelete('/program/editions/${id}') and formatting the result with formatDelete.
    server.registerTool(
      "delete_program_edition",
      {
        description: "Delete a program edition",
        annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the program edition to delete") },
      },
      async ({ id }) => {
        try {
          const record = await apiDelete<EduframeRecord>(`/program/editions/${id}`);
          void logResponse("delete_program_edition", { id }, record);
          return formatDelete(record, "program edition");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Input schema for delete_program_edition: requires a positive integer 'id' field.
    inputSchema: { id: z.number().int().positive().describe("ID of the program edition to delete") },
  • The registerProgramEditionTools function is included in the global tools registration list in tools/index.ts, called when registerAllTools() runs.
    registerProgramEditionTools,
  • The apiDelete helper function used by the handler to perform an HTTP DELETE request to the Eduframe API.
    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);
    }
  • The formatDelete helper used by the handler to format the API response into a human-readable success message.
    export function formatDelete(record: EduframeRecord, resourceName: string): CallToolResult {
      return {
        content: [
          {
            type: "text",
            text: `Successfully deleted ${resourceName}:\n\n${formatJSON(record)}${RESPONSE_LOG_HINT}`,
          },
        ],
      };
    }
Behavior3/5

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

Annotations already indicate destructiveHint=true and idempotentHint=true, which partially cover behavioral traits. The description adds no additional context about side effects (e.g., cascading deletes, irreversibility) beyond what annotations provide, so it meets the baseline but does not exceed it.

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

Conciseness5/5

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

The description is a single concise sentence with no wasted words. It front-loads the core purpose and does not include any redundant information.

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

Completeness3/5

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

For a simple delete tool with one parameter, the description is minimally adequate. However, it lacks any mention of the consequences of deletion (e.g., whether it also deletes associated elements, enrollments, or is permanent). Given the availability of annotations, the description could still benefit from a brief note on side effects.

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% coverage with a clear description for the 'id' parameter. The tool description does not add any extra meaning or clarification beyond what the schema already provides, so the baseline score of 3 is appropriate.

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

Purpose5/5

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

The description clearly states the specific verb 'Delete' and the resource 'program edition', which is distinct from sibling tools like delete_program or delete_program_element. It leaves no ambiguity about the tool's function.

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 vs alternatives (e.g., cancel_program_enrollment for enrollments, or deactivate_teacher for similar deactivation). There is no mention of prerequisites, conditions for safe deletion, or what happens to related records.

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