Skip to main content
Glama

get_planned_courses_by_id_and_course_id

Read-onlyIdempotent

Retrieve a specific planned course record using its ID and parent course ID. Use this to access detailed information about an individual planned course.

Instructions

Get a planned course record of a single course

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYesID of the parent resource
idYesID of the planned course to retrieve

Implementation Reference

  • The handler function that executes the 'get_planned_courses_by_id_and_course_id' tool logic. It takes course_id and id as parameters, calls apiGet on GET /courses/{course_id}/planned_courses/{id}, logs the response, and formats the result.
    async ({ course_id, id }) => {
      try {
        const record = await apiGet<EduframeRecord>(`/courses/${course_id}/planned_courses/${id}`);
        void logResponse("get_planned_courses_by_id_and_course_id", { course_id, id }, record);
        return formatShow(record, "planned course");
      } catch (error) {
        return formatError(error);
      }
    },
  • Input schema definition for the tool. Defines required parameters: course_id (positive integer) and id (positive integer).
    inputSchema: {
      course_id: z.number().int().positive().describe("ID of the parent resource"),
      id: z.number().int().positive().describe("ID of the planned course to retrieve"),
    },
  • Tool registration call using server.registerTool with the name 'get_planned_courses_by_id_and_course_id', including metadata (readOnlyHint, destructiveHint, idempotentHint) and the handler.
    server.registerTool(
      "get_planned_courses_by_id_and_course_id",
      {
        description: "Get a planned course record of a single course",
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
        inputSchema: {
          course_id: z.number().int().positive().describe("ID of the parent resource"),
          id: z.number().int().positive().describe("ID of the planned course to retrieve"),
        },
      },
      async ({ course_id, id }) => {
        try {
          const record = await apiGet<EduframeRecord>(`/courses/${course_id}/planned_courses/${id}`);
          void logResponse("get_planned_courses_by_id_and_course_id", { course_id, id }, record);
          return formatShow(record, "planned course");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • The tool registration function is registered in the central tools index as part of the registerPlannedCourseTools array entry.
    registerPlannedCourseTools,
Behavior3/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description only reiterates that it retrieves a record, adding no extra behavioral context such as auth requirements or result format.

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 sentence that efficiently communicates the tool's function without any unnecessary words or redundancy.

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?

Given no output schema, the description does not explain return values. However, for a simple get-by-ID operation, the description is minimally adequate. It could be improved by mentioning typical fields, but it is not incomplete.

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 coverage is 100% with descriptions for both parameters. The description adds no additional meaning beyond what the schema already provides, so 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 uses a specific verb ('Get') and identifies the resource ('planned course record') with scope ('single course'). It clearly distinguishes from sibling tool get_planned_courses_by_course_id which retrieves multiple records.

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?

The description implies usage when a single planned course record is needed given both IDs, but it does not state when to avoid this tool (e.g., if a list is needed) or mention alternatives like get_planned_courses_by_course_id.

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