canvas_get_user_profile
Retrieve the current user's profile details directly from the Canvas Learning Management System API using this tool. Streamline profile data access for managing courses, enrollments, and grades efficiently.
Instructions
Get current user's profile
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- src/client.ts:585-588 (handler)Core implementation of the user profile retrieval via Canvas API GET /users/self/profileasync getUserProfile(): Promise<CanvasUserProfile> { const response = await this.client.get('/users/self/profile'); return response.data; }
- src/index.ts:1325-1330 (handler)MCP server tool handler that calls CanvasClient.getUserProfile() and returns JSON-formatted responsecase "canvas_get_user_profile": { const profile = await this.client.getUserProfile(); return { content: [{ type: "text", text: JSON.stringify(profile, null, 2) }] }; }
- src/index.ts:412-419 (registration)Tool registration entry in TOOLS array defining name, description, and empty input schemaname: "canvas_get_user_profile", description: "Get current user's profile", inputSchema: { type: "object", properties: {}, required: [] } },
- src/types.ts:52-66 (schema)TypeScript interface defining the structure of the Canvas user profile responseexport interface CanvasUserProfile { id: number; name: string; sortable_name: string; short_name: string; sis_user_id: string | null; login_id: string; avatar_url: string; primary_email: string; locale: string; bio: string | null; title?: string; time_zone?: string; calendar?: any; }