Skip to main content
Glama

canvas_get_account

Retrieve detailed account information from the Canvas Learning Management System by providing the account ID, enabling efficient management and integration with Canvas resources.

Instructions

Get account details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYesID of the account

Implementation Reference

  • Core handler function that makes the Canvas API call to retrieve account details by ID.
    async getAccount(accountId: number): Promise<CanvasAccount> { const response = await this.client.get(`/accounts/${accountId}`); return response.data; }
  • src/index.ts:714-722 (registration)
    Tool registration in the TOOLS array, defining name, description, and input schema.
    name: "canvas_get_account", description: "Get account details", inputSchema: { type: "object", properties: { account_id: { type: "number", description: "ID of the account" } }, required: ["account_id"] }
  • MCP server handler that validates input and delegates to CanvasClient.getAccount.
    case "canvas_get_account": { const { account_id } = args as { account_id: number }; if (!account_id) throw new Error("Missing required field: account_id"); const account = await this.client.getAccount(account_id); return { content: [{ type: "text", text: JSON.stringify(account, null, 2) }] }; }
  • TypeScript interface defining the structure of CanvasAccount response data.
    export interface CanvasAccount { id: number; name: string; uuid: string; parent_account_id: number | null; root_account_id: number | null; default_storage_quota_mb: number; default_user_storage_quota_mb: number; default_group_storage_quota_mb: number; default_time_zone: string; sis_account_id: string | null; integration_id: string | null; sis_import_id: number | null; lti_guid: string; workflow_state: string; }

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