canvas_get_dashboard_cards
Retrieve dashboard course cards from Canvas LMS using the MCP server to access and manage course-related data efficiently.
Instructions
Get dashboard course cards
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- src/client.ts:482-485 (handler)Core handler function in CanvasClient that executes the Canvas API call to retrieve dashboard cards from '/dashboard/dashboard_cards' endpoint.async getDashboardCards(): Promise<any[]> { const response = await this.client.get('/dashboard/dashboard_cards'); return response.data; }
- src/index.ts:1317-1322 (handler)MCP tool handler in the CallToolRequestSchema switch statement that invokes the client method and formats the response.case "canvas_get_dashboard_cards": { const cards = await this.client.getDashboardCards(); return { content: [{ type: "text", text: JSON.stringify(cards, null, 2) }] }; }
- src/index.ts:378-386 (registration)Tool registration in the TOOLS array used by ListToolsRequestSchema, including name, description, and empty input schema.{ name: "canvas_get_dashboard_cards", description: "Get dashboard course cards", inputSchema: { type: "object", properties: {}, required: [] } },
- src/types.ts:511-525 (schema)TypeScript interface defining the structure of Canvas dashboard cards returned by the tool.export interface CanvasDashboardCard { id: number; shortName: string; originalName: string; courseCode: string; assetString: string; href: string; term?: CanvasTerm; subtitle: string; enrollmentType: string; observee?: string; image?: string; color: string; position?: number; }