Skip to main content
Glama

canvas_create_account_report

Generate detailed reports for Canvas accounts by specifying the account ID and report type, enabling effective management of courses, assignments, enrollments, and grades.

Instructions

Generate a report for an account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYesID of the account
parametersNoReport parameters
reportYesType of report to generate

Implementation Reference

  • The main handler for the 'canvas_create_account_report' tool in the MCP server's CallToolRequestSchema handler. Validates input and calls CanvasClient.createAccountReport.
    case "canvas_create_account_report": { const createReportArgs = args as unknown as CreateReportArgs; if (!createReportArgs.account_id || !createReportArgs.report) { throw new Error("Missing required fields: account_id and report"); } const report = await this.client.createAccountReport(createReportArgs); return { content: [{ type: "text", text: JSON.stringify(report, null, 2) }] }; }
  • src/index.ts:809-820 (registration)
    Tool registration entry in the TOOLS array, defining name, description, and input schema for listTools.
    name: "canvas_create_account_report", description: "Generate a report for an account", inputSchema: { type: "object", properties: { account_id: { type: "number", description: "ID of the account" }, report: { type: "string", description: "Type of report to generate" }, parameters: { type: "object", description: "Report parameters" } }, required: ["account_id", "report"] } }
  • TypeScript interface defining the input parameters for createAccountReport, matching the tool's inputSchema.
    export interface CreateReportArgs { account_id: number; report: string; parameters?: Record<string, any>; }
  • Core CanvasClient method that makes the API POST request to create an account report.
    async createAccountReport(args: CreateReportArgs): Promise<CanvasAccountReport> { const { account_id, report, parameters } = args; const response = await this.client.post(`/accounts/${account_id}/reports/${report}`, { parameters: parameters || {} }); return response.data; }
  • TypeScript interface for the CanvasAccountReport return type.
    export interface CanvasAccountReport { id: number; report: string; file_url?: string; attachment?: CanvasFile; status: 'created' | 'running' | 'complete' | 'error'; created_at: string; started_at?: string; ended_at?: string; parameters: Record<string, any>; progress: number; current_line?: number; }

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