Skip to main content
Glama

canvas_get_course

Retrieve detailed course information from the Canvas Learning Management System by providing the course ID. Facilitates access to essential data for managing and organizing educational resources.

Instructions

Get detailed information about a specific course

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYesID of the course

Implementation Reference

  • Handler that executes the canvas_get_course tool: validates course_id input, calls CanvasClient.getCourse(course_id), and returns the course data as JSON text.
    case "canvas_get_course": {
      const { course_id } = args as { course_id: number };
      if (!course_id) throw new Error("Missing required field: course_id");
      
      const course = await this.client.getCourse(course_id);
      return {
        content: [{ type: "text", text: JSON.stringify(course, null, 2) }]
      };
    }
  • Tool schema definition for canvas_get_course, specifying input as object with required number course_id.
    {
      name: "canvas_get_course",
      description: "Get detailed information about a specific course",
      inputSchema: {
        type: "object",
        properties: {
          course_id: { type: "number", description: "ID of the course" }
        },
        required: ["course_id"]
      }
    },
  • src/index.ts:1071-1073 (registration)
    Registers the list tools handler which returns the TOOLS array containing canvas_get_course.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS
    }));
  • CanvasClient.getCourse implementation that fetches detailed course information from Canvas API with specified includes.
    async getCourse(courseId: number): Promise<CanvasCourse> {
      const response = await this.client.get(`/courses/${courseId}`, {
        params: {
          include: ['total_students', 'teachers', 'term', 'course_progress', 'sections', 'syllabus_body']
        }
      });
      return response.data;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'gets' information, implying a read-only operation, but doesn't specify authentication requirements, rate limits, error conditions, or what 'detailed information' includes (e.g., fields returned). This is inadequate for a tool with zero annotation coverage.

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, efficient sentence that front-loads the core purpose without unnecessary words. It could be slightly more structured by including usage context, but it earns its place by being direct and clear.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what 'detailed information' entails (e.g., course name, dates, enrollment), behavioral aspects like permissions or errors, or how it differs from similar tools. For a read operation with rich sibling tools, more context is 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 description coverage is 100%, with the single parameter 'course_id' clearly documented in the schema. The description adds no additional meaning beyond implying the parameter is required for fetching course details. This meets the baseline of 3 when the schema does the heavy lifting.

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 verb ('Get') and resource ('detailed information about a specific course'), making the purpose evident. It distinguishes from siblings like 'canvas_list_courses' by specifying retrieval of detailed info for a single course rather than listing multiple courses. However, it doesn't explicitly contrast with other get tools (e.g., 'canvas_get_course_grades'), leaving minor ambiguity.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a course ID), exclusions (e.g., not for listing courses), or direct comparisons to siblings like 'canvas_get_course_grades' or 'canvas_list_courses'. Usage is implied by the name but not explicitly stated.

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

Related 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/DMontgomery40/mcp-canvas-lms'

If you have feedback or need assistance with the MCP directory API, please join our Discord server