Skip to main content
Glama

get_course_location

Read-onlyIdempotent

Retrieve a course location record by specifying its ID. Access stored location details to manage course logistics.

Instructions

Get a course location record

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the course location to retrieve

Implementation Reference

  • The handler function for the 'get_course_location' tool. Takes an 'id' parameter, fetches the course location record via apiGet from /course_locations/{id}, logs the response, and returns the formatted result using formatShow.
    async ({ id }) => {
      try {
        const record = await apiGet<EduframeRecord>(`/course_locations/${id}`);
        void logResponse("get_course_location", { id }, record);
        return formatShow(record, "course location");
      } catch (error) {
        return formatError(error);
      }
    },
  • The schema/input definition for the 'get_course_location' tool. Specifies the required 'id' parameter (positive integer) and read-only annotations.
    {
      description: "Get a course location record",
      annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
      inputSchema: { id: z.number().int().positive().describe("ID of the course location to retrieve") },
  • Registration of the 'get_course_location' tool via server.registerTool() within registerCourseLocationTools().
    server.registerTool(
      "get_course_location",
      {
        description: "Get a course location record",
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
        inputSchema: { id: z.number().int().positive().describe("ID of the course location to retrieve") },
      },
      async ({ id }) => {
        try {
          const record = await apiGet<EduframeRecord>(`/course_locations/${id}`);
          void logResponse("get_course_location", { id }, record);
          return formatShow(record, "course location");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • Registration function included in the tools array in src/tools/index.ts, which is called by registerAllTools() to register all tools including course location tools on the MCP server.
    registerCourseLocationTools,
  • Helper function formatShow used by the handler to format the retrieved course location record as a human-readable text result.
    export function formatShow(record: EduframeRecord, resourceName: string): CallToolResult {
      return {
        content: [
          {
            type: "text",
            text: `${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 readOnlyHint=true, destructiveHint=false, idempotentHint=true; description adds no extra behavioral context.

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?

Single clear sentence with no unnecessary information, appropriate for a simple retrieval.

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

Completeness5/5

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

For a simple get operation with one parameter and annotations covering safety, description is complete. No output schema needed.

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% with parameter description for 'id'. Description does not add meaning beyond schema.

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?

Description uses specific verb 'Get' and resource 'course location record', clearly distinguishing it from siblings like 'get_course_locations'.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool vs alternatives (e.g., get_course_locations). Usage is implied but not clarified.

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