Skip to main content
Glama

canvas_get_account_reports

Retrieve available reports for a specific Canvas account using its ID, enabling efficient management and analysis of course and user data.

Instructions

List available reports for an account

Input Schema

NameRequiredDescriptionDefault
account_idYesID of the account

Input Schema (JSON Schema)

{ "properties": { "account_id": { "description": "ID of the account", "type": "number" } }, "required": [ "account_id" ], "type": "object" }

Implementation Reference

  • src/index.ts:797-807 (registration)
    Tool registration in TOOLS array defining name, description, and input schema
    { name: "canvas_get_account_reports", description: "List available reports for an account", inputSchema: { type: "object", properties: { account_id: { type: "number", description: "ID of the account" } }, required: ["account_id"] } },
  • Tool handler dispatch in CallToolRequestSchema switch statement, validates args and calls client method
    case "canvas_get_account_reports": { const { account_id } = args as { account_id: number }; if (!account_id) throw new Error("Missing required field: account_id"); const reports = await this.client.getAccountReports(account_id); return { content: [{ type: "text", text: JSON.stringify(reports, null, 2) }] }; }
  • Core handler implementation in CanvasClient - makes API call to /accounts/{accountId}/reports and returns data
    async getAccountReports(accountId: number): Promise<any[]> { const response = await this.client.get(`/accounts/${accountId}/reports`); return response.data; }
  • Type definition for CanvasAccountReport - output schema for account reports
    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; }
  • Input schema definition for the tool - requires account_id as number
    inputSchema: { type: "object", properties: { account_id: { type: "number", description: "ID of the account" } }, required: ["account_id"] }

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