Skip to main content
Glama

canvas_get_discussion_topic

Retrieve detailed information about a specific discussion topic in a Canvas course by providing the course ID and topic ID.

Instructions

Get details of a specific discussion topic

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYesID of the course
topic_idYesID of the discussion topic

Implementation Reference

  • Core implementation of fetching a Canvas discussion topic via API call, including assignment details.
    async getDiscussionTopic(courseId: number, topicId: number): Promise<CanvasDiscussionTopic> {
      const response = await this.client.get(`/courses/${courseId}/discussion_topics/${topicId}`, {
        params: {
          include: ['assignment']
        }
      });
      return response.data;
    }
  • src/index.ts:532-541 (registration)
    MCP tool registration defining the tool name, description, and input schema validation.
    name: "canvas_get_discussion_topic",
    description: "Get details of a specific discussion topic",
    inputSchema: {
      type: "object",
      properties: {
        course_id: { type: "number", description: "ID of the course" },
        topic_id: { type: "number", description: "ID of the discussion topic" }
      },
      required: ["course_id", "topic_id"]
    }
  • TypeScript interface defining the structure of a Canvas discussion topic response (output schema).
    export interface CanvasDiscussionTopic {
      id: number;
      title: string;
      message: string;
      html_url: string;
      posted_at: string;
      assignment_id: number | null;
      assignment?: CanvasAssignment;
      discussion_type: string;
      require_initial_post: boolean;
      user_has_posted: boolean;
      discussion_subentry_count: number;
      read_state: 'read' | 'unread';
      unread_count: number;
    }
  • MCP server tool handler that validates input, calls the client method, and formats the response.
    try {
      const args = request.params.arguments || {};
      const toolName = request.params.name;
      
      console.error(`[Canvas MCP] Executing tool: ${toolName}`);
      
      switch (toolName) {
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's a 'Get' operation, implying read-only behavior, but doesn't clarify permissions required, rate limits, error handling, or what 'details' include (e.g., metadata, posts, attachments). For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

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's front-loaded with the core action ('Get details'), making it easy to parse quickly. There's no redundancy or fluff, earning full marks for conciseness and structure.

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 complexity of a read operation with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'details' are returned (e.g., topic title, posts, dates), potential side effects, or error scenarios. For a tool that likely returns structured data, more context is needed to guide effective use, especially without annotations to fill in behavioral gaps.

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, clearly documenting both parameters ('course_id' and 'topic_id') as required IDs. The description adds no additional meaning beyond the schema, such as format examples or relationship context. Given the high schema coverage, a baseline score of 3 is appropriate, as the schema adequately handles parameter documentation without extra input from the description.

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 details') and resource ('of a specific discussion topic'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'canvas_list_discussion_topics' (which lists topics) or 'canvas_post_to_discussion' (which creates posts), leaving room for improvement in distinguishing specific use cases.

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 course and topic IDs), contrast with 'canvas_list_discussion_topics' for browsing topics, or specify use cases like retrieving topic metadata for editing or viewing details. This lack of context could lead to misuse among similar tools.

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