canvas_health_check
Monitor and verify the health and connectivity of the Canvas API to ensure reliable interaction with courses, assignments, enrollments, and grades.
Instructions
Check the health and connectivity of the Canvas API
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- src/index.ts:1085-1090 (handler)Executes the canvas_health_check tool by calling the CanvasClient's healthCheck method and returning the result as formatted JSON text.case "canvas_health_check": { const health = await this.client.healthCheck(); return { content: [{ type: "text", text: JSON.stringify(health, null, 2) }] }; }
- src/index.ts:40-48 (schema)Defines the tool schema including name, description, and empty input schema (no parameters required).{ name: "canvas_health_check", description: "Check the health and connectivity of the Canvas API", inputSchema: { type: "object", properties: {}, required: [] } },
- src/index.ts:1071-1074 (registration)Registers the list of available tools, including canvas_health_check, via the ListToolsRequestSchema handler.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
- src/client.ts:193-207 (helper)Core helper function in CanvasClient that performs the health check by attempting to fetch the current user's profile, returning status and basic user info on success or error status.async healthCheck(): Promise<{ status: 'ok' | 'error'; timestamp: string; user?: any }> { try { const user = await this.getUserProfile(); return { status: 'ok', timestamp: new Date().toISOString(), user: { id: user.id, name: user.name } }; } catch (error) { return { status: 'error', timestamp: new Date().toISOString() }; } }