Skip to main content
Glama

canvas_get_submission

Retrieve submission details for a specific assignment in a Canvas course by providing course ID, assignment ID, and optional user ID.

Instructions

Get submission details for an assignment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assignment_idYesID of the assignment
course_idYesID of the course
user_idNoID of the user (optional, defaults to self)

Implementation Reference

  • Core implementation of canvas_get_submission tool: Makes authenticated GET request to Canvas API endpoint for retrieving a specific user's submission for an assignment, including comments, rubric assessment, and assignment details.
    async getSubmission(courseId: number, assignmentId: number, userId: number | 'self' = 'self'): Promise<CanvasSubmission> {
      const response = await this.client.get(
        `/courses/${courseId}/assignments/${assignmentId}/submissions/${userId}`,
        {
          params: {
            include: ['submission_comments', 'rubric_assessment', 'assignment']
          }
        }
      );
      return response.data;
    }
  • src/index.ts:224-235 (registration)
    MCP tool registration defining the name, description, and input schema (JSON Schema) for the canvas_get_submission tool.
      name: "canvas_get_submission",
      description: "Get submission details for an assignment",
      inputSchema: {
        type: "object",
        properties: {
          course_id: { type: "number", description: "ID of the course" },
          assignment_id: { type: "number", description: "ID of the assignment" },
          user_id: { type: "number", description: "ID of the user (optional, defaults to self)" }
        },
        required: ["course_id", "assignment_id"]
      }
    },
  • Tool dispatch handler in MCP server: Validates input arguments, calls CanvasClient.getSubmission, and formats response as MCP content block.
    case "canvas_get_submission": {
      const { course_id, assignment_id, user_id } = args as { 
        course_id: number; 
        assignment_id: number;
        user_id?: number;
      };
      if (!course_id || !assignment_id) {
        throw new Error("Missing required fields: course_id and assignment_id");
      }
      
      const submission = await this.client.getSubmission(course_id, assignment_id, user_id || 'self');
      return {
        content: [{ type: "text", text: JSON.stringify(submission, null, 2) }]
      };
    }
  • TypeScript interface defining the structure of Canvas submission data returned by the tool.
    export interface CanvasSubmission {
      readonly id: number;
      readonly assignment_id: AssignmentId;
      readonly user_id: UserId;
      readonly submitted_at: string | null;
      readonly score: number | null;
      readonly grade: string | null;
      readonly attempt: number;
      readonly workflow_state: CanvasSubmissionState;
      readonly body?: string;
      readonly url?: string;
      readonly attachments?: CanvasFile[];
      readonly submission_comments?: CanvasSubmissionComment[];
      readonly rubric_assessment?: CanvasRubricAssessment;
      readonly late: boolean;
      readonly missing: boolean;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a 'Get' operation, implying read-only behavior, but doesn't specify authentication requirements, rate limits, error conditions, or what 'details' are returned. For a tool with no annotation coverage, this leaves significant behavioral gaps.

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 gets straight to the point with zero wasted words. It's appropriately sized for a simple retrieval tool and front-loads the essential information.

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?

For a retrieval tool with good schema coverage but no annotations and no output schema, the description provides the basic purpose but lacks important context. It doesn't explain what 'submission details' include, whether authentication is required, or how errors are handled. The minimum viable threshold is met but with clear 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?

Schema description coverage is 100%, so all parameters are documented in the schema. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., it doesn't explain format of IDs or clarify the optional user_id default behavior). Baseline 3 is appropriate when 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 ('submission details for an assignment'), making the purpose immediately understandable. It distinguishes this as a retrieval tool rather than a creation or modification tool, though it doesn't explicitly differentiate from similar 'get' siblings like canvas_get_assignment or canvas_get_user_grades.

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?

No guidance is provided about when to use this tool versus alternatives. While the description implies it's for retrieving submission details, there's no mention of prerequisites (e.g., needing course/assignment IDs), when not to use it, or how it differs from other submission-related tools like canvas_submit_assignment or canvas_get_user_grades.

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