Skip to main content
Glama

update_course_location

Idempotent

Update a course location's name and address attributes. Provide the location ID; optionally update name, street, city, postal code, and other address fields.

Instructions

Update a course location.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the course location to update
nameNoName of the location where the course is held.
address_attributesNo

Implementation Reference

  • The async handler function that executes the update_course_location tool logic. It receives destructured { id, ...body }, calls apiPatch to PATCH /course_locations/{id}, logs the response, and formats the result.
      async ({ id, ...body }) => {
        try {
          const record = await apiPatch<EduframeRecord>(`/course_locations/${id}`, body);
          void logResponse("update_course_location", { id, ...body }, record);
          return formatUpdate(record, "course location");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Input schema for update_course_location: requires an 'id' (positive int) and optional 'name' and 'address_attributes' fields.
    inputSchema: {
      id: z.number().int().positive().describe("ID of the course location to update"),
      name: z.string().optional().describe("Name of the location where the course is held."),
      address_attributes: z
        .object({
          addressee: z.string().optional().describe("The addressee of the address."),
          address: z.string().optional().describe("Concatenation of the street and house number."),
          address_line2: z.string().optional().describe("A string representing the second line of the address."),
          postal_code: z.string().optional().describe("A string representing the postal code."),
          city: z.string().optional().describe("A string representing the city."),
          state_province: z.string().optional().describe("An letter USA state code."),
          country: z.string().optional().describe("An ISO3166 two-letter country code."),
        })
        .optional(),
    },
  • Registration of the tool via server.registerTool('update_course_location', ...) with its schema, annotations, and handler.
    server.registerTool(
      "update_course_location",
      {
        description: "Update a course location.",
        annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
        inputSchema: {
          id: z.number().int().positive().describe("ID of the course location to update"),
          name: z.string().optional().describe("Name of the location where the course is held."),
          address_attributes: z
            .object({
              addressee: z.string().optional().describe("The addressee of the address."),
              address: z.string().optional().describe("Concatenation of the street and house number."),
              address_line2: z.string().optional().describe("A string representing the second line of the address."),
              postal_code: z.string().optional().describe("A string representing the postal code."),
              city: z.string().optional().describe("A string representing the city."),
              state_province: z.string().optional().describe("An letter USA state code."),
              country: z.string().optional().describe("An ISO3166 two-letter country code."),
            })
            .optional(),
        },
      },
      async ({ id, ...body }) => {
        try {
          const record = await apiPatch<EduframeRecord>(`/course_locations/${id}`, body);
          void logResponse("update_course_location", { id, ...body }, record);
          return formatUpdate(record, "course location");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • registerAllTools iterates over all tool registration functions including registerCourseLocationTools, which registers update_course_location.
    export function registerAllTools(server: McpServer): void {
      for (const register of tools) {
        register(server);
      }
    }
  • The apiPatch helper function that performs the PATCH HTTP request to update the resource on the Eduframe API.
    /**
     * Perform a PATCH request to partially update a resource.
     *
     * @param path - API path, e.g. "/leads/1"
     * @param body - Request body
     */
    export async function apiPatch<T>(path: string, body: unknown): Promise<T> {
      const { token } = getConfig();
      const url = buildUrl(path);
    
      const response = await fetch(url.toString(), {
        method: "PATCH",
        headers: buildHeaders(token),
        body: JSON.stringify(body),
      });
    
      return handleResponse<T>(response);
    }
Behavior2/5

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

Annotations indicate idempotentHint=true and destructiveHint=false, but the description adds no additional behavioral detail (e.g., whether partial updates are allowed, what happens to missing fields). It merely restates the action already implied by the name.

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 four words, the description is extremely concise but under-informative. While not verbose, it sacrifices necessary context for brevity, which is not true conciseness but under-specification.

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 presence of sibling tools for create and delete, and a nested object parameter (address_attributes), the description is too minimal. It fails to explain key behaviors like the effect of omitting optional fields or the nature of the address update. No output schema exists, so the description carries the full burden but falls short.

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?

Input schema descriptions cover the three parameters (id, name, address_attributes) adequately, so the description's lack of parameter detail is acceptable. The tool description does not add value beyond the schema, meeting the baseline for high schema coverage.

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?

Description clearly states verb 'Update' and resource 'course location', making the basic action obvious. However, it does not differentiate from sibling tools like create_course_location or delete_course_location, which could be more explicit.

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 (e.g., create_course_location, update_course). No prerequisites or context provided, leaving the agent to infer usage from the name alone.

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