Skip to main content
Glama

delete_teacher_enrollment

DestructiveIdempotent

Remove a teacher enrollment record by providing the enrollment ID.

Instructions

Delete a teacher enrollment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the teacher enrollment to delete

Implementation Reference

  • Handler function for delete_teacher_enrollment tool. Takes an 'id' parameter, sends a DELETE request to /teacher_enrollments/:id, logs the response, and formats the deletion result.
    server.registerTool(
      "delete_teacher_enrollment",
      {
        description: "Delete a teacher enrollment.",
        annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the teacher enrollment to delete") },
      },
      async ({ id }) => {
        try {
          const record = await apiDelete<EduframeRecord>(`/teacher_enrollments/${id}`);
          void logResponse("delete_teacher_enrollment", { id }, record);
          return formatDelete(record, "teacher enrollment");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Input schema for delete_teacher_enrollment: requires a positive integer 'id'.
    inputSchema: { id: z.number().int().positive().describe("ID of the teacher enrollment to delete") },
  • Registration of delete_teacher_enrollment via server.registerTool() inside registerTeacherEnrollmentTools.
    server.registerTool(
      "delete_teacher_enrollment",
      {
        description: "Delete a teacher enrollment.",
        annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the teacher enrollment to delete") },
      },
      async ({ id }) => {
        try {
          const record = await apiDelete<EduframeRecord>(`/teacher_enrollments/${id}`);
          void logResponse("delete_teacher_enrollment", { id }, record);
          return formatDelete(record, "teacher enrollment");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Global registration: registerTeacherEnrollmentTools is included in the tools array that registerAllTools iterates over.
    export function registerAllTools(server: McpServer): void {
      for (const register of tools) {
        register(server);
  • Helper function apiDelete that performs the actual 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);
    }
Behavior3/5

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

Annotations already provide destructiveHint=true and idempotentHint=true. The description does not add further context, but it doesn't contradict. The bar is lower due to annotations, but additional details on irreversibility or side effects would improve transparency.

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

Conciseness4/5

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

The description is a single concise sentence. It is front-loaded and contains no redundant information, though it could be slightly expanded without losing conciseness.

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?

The description is minimal for a delete operation. It does not mention expected return values or effects (e.g., whether the operation is permanent, or if it confirms deletion). Given no output schema, this information would help the agent.

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?

Schema coverage is 100% and the schema describes the 'id' parameter as 'ID of the teacher enrollment to delete'. The description adds no extra meaning beyond the schema.

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

Purpose4/5

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

The description clearly states the action (delete) and resource (teacher enrollment), making the purpose unambiguous. It distinguishes from siblings like delete_teacher_role or cancel_enrollment, though it doesn't explicitly differentiate scope.

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 on when to use this tool instead of alternatives like cancel_enrollment or deactivate_teacher. Prerequisites or effects on related data are not mentioned.

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