Skip to main content
Glama

delete_course_location

DestructiveIdempotent

Delete a course location by its ID, permanently removing it from your system.

Instructions

Delete a course location.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the course location to delete

Implementation Reference

  • Handler registration for the 'delete_course_location' tool. Calls apiDelete on /course_locations/{id}, logs the response, and returns a formatted delete result.
    server.registerTool(
      "delete_course_location",
      {
        description: "Delete a course location.",
        annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the course location to delete") },
      },
      async ({ id }) => {
        try {
          const record = await apiDelete<EduframeRecord>(`/course_locations/${id}`);
          void logResponse("delete_course_location", { id }, record);
          return formatDelete(record, "course location");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Input schema for delete_course_location: requires a positive integer 'id'.
    inputSchema: { id: z.number().int().positive().describe("ID of the course location to delete") },
  • Function that registers all course location tools (including delete_course_location) on the MCP server.
    export function registerCourseLocationTools(server: McpServer): void {
  • registerCourseLocationTools is included in the aggregated list of all tool registrations, called by registerAllTools.
    const tools: Array<(server: McpServer) => void> = [
      registerAccountTools,
      registerAffiliationTools,
      registerAttendanceTools,
      registerAuthenticationTools,
      registerCatalogProductTools,
      registerCatalogVariantTools,
      registerCategorieTools,
      registerCertificateTools,
      registerCommentTools,
      registerCourseLocationTools,
      registerCourseTabTools,
      registerCourseVariantTools,
      registerCourseTools,
      registerCreditCategorieTools,
      registerCreditTools,
      registerCustomAssociationTools,
      registerCustomFieldOptionTools,
      registerCustomObjectTools,
      registerCustomRecordTools,
      registerDiscountCodeTools,
      registerEditionDescriptionSectionTools,
      registerEducatorTools,
      registerEmailTools,
      registerEnrollmentTools,
      registerGradeTools,
      registerInvoiceVatTools,
      registerInvoiceTools,
      registerLabelTools,
      registerLeadTools,
      registerMaterialGroupTools,
      registerMaterialTools,
      registerMeetingLocationTools,
      registerMeetingTools,
      registerOrderTools,
      registerOrganizationTools,
      registerPaymentMethodTools,
      registerPaymentOptionTools,
      registerPaymentTools,
      registerPlannedCourseTools,
      registerPlanningAttendeeTools,
      registerPlanningConflictTools,
      registerPlanningEventTools,
      registerPlanningLocationTools,
      registerPlanningMaterialTools,
      registerPlanningRequiredTeacherGroupAttendeeTools,
      registerPlanningTeacherTools,
      registerProgramEditionTools,
      registerProgramElementTools,
      registerProgramEnrollmentTools,
      registerProgramPersonalProgramElementTools,
      registerProgramProgramTools,
      registerReferralTools,
      registerSignupQuestionTools,
      registerTaskTools,
      registerTeacherEnrollmentTools,
      registerTeacherRoleTools,
      registerTeacherTools,
      registerTheseTools,
      registerUserTools,
      registerWebhookNotificationTools,
      registerWebhookTools,
    ];
    
    export function registerAllTools(server: McpServer): void {
      for (const register of tools) {
        register(server);
      }
    }
  • Helper function that performs the HTTP DELETE request used by the delete_course_location handler.
    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 adds no additional behavioral context beyond what annotations give, but does not contradict them.

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?

Extremely concise single sentence with no wasted words. The purpose is front-loaded and immediately clear.

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

Completeness4/5

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

Given the simplicity of the tool (one parameter, clear annotations), the description is mostly complete. Could potentially mention the permanent nature or dependencies, but not strictly necessary.

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 parameter 'id' is fully documented in the schema with a clear description. The tool description does not add any extra meaning beyond the schema, so baseline score applies.

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 the resource (course location). It is specific enough to distinguish from other tools with different resources, but does not explicitly differentiate from sibling delete tools.

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 versus alternatives like update_course_location or get_course_location. No prerequisites or conditions are 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