Skip to main content
Glama

canvas_list_pages

Retrieve a list of pages within a Canvas course using the course ID to organize and manage course content efficiently through the Canvas LMS API.

Instructions

List pages in a course

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYesID of the course

Implementation Reference

  • src/index.ts:319-328 (registration)
    Registration of the canvas_list_pages tool including its name, description, and input schema requiring course_id.
    {
      name: "canvas_list_pages",
      description: "List pages in a course",
      inputSchema: {
        type: "object",
        properties: {
          course_id: { type: "number", description: "ID of the course" }
        },
        required: ["course_id"]
      }
  • Handler for canvas_list_pages tool: extracts course_id, calls client.listPages, returns JSON stringified pages.
    case "canvas_list_pages": {
      const { course_id } = args as { course_id: number };
      if (!course_id) throw new Error("Missing required field: course_id");
      
      const pages = await this.client.listPages(course_id);
      return {
        content: [{ type: "text", text: JSON.stringify(pages, null, 2) }]
      };
    }
  • CanvasClient.listPages implementation: makes GET request to /courses/{courseId}/pages and returns the pages data.
    async listPages(courseId: number): Promise<CanvasPage[]> {
      const response = await this.client.get(`/courses/${courseId}/pages`);
      return response.data;
    }
  • TypeScript interface definition for CanvasPage, the return type of listPages.
    export interface CanvasPage {
      page_id: number;
      url: string;
      title: string;
      body: string;
      created_at: string;
      updated_at: string;
      published: boolean;
      front_page: boolean;
      locked_for_user: boolean;
      lock_explanation?: string;
      editing_roles: string;
      html_url: string;
    }
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 a read operation ('List'), which implies non-destructive behavior, but fails to mention any constraints like pagination, rate limits, permissions required, or the format of returned data. This leaves significant gaps in understanding how the tool behaves in practice.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy for an agent to parse quickly.

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 lack of annotations and output schema, the description is incomplete. It does not address behavioral aspects like pagination or error handling, nor does it explain the return format. For a list operation with no structured output documentation, more context is needed to ensure the agent can use it effectively.

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 input schema has 100% description coverage, with 'course_id' clearly documented. The description does not add any meaning beyond the schema, such as explaining what constitutes a valid course ID or how to obtain it. Since the schema is comprehensive, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 ('List') and resource ('pages in a course'), making the purpose specific and understandable. It distinguishes from siblings like 'canvas_get_page' (which retrieves a single page) by implying a collection, but could be more explicit about the difference.

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, such as 'canvas_get_page' for a single page or 'canvas_list_files' for other resources. It lacks context about prerequisites or exclusions, leaving the agent to infer usage based on 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

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