Skip to main content
Glama

canvas_create_account_report

Generate detailed reports for Canvas accounts by specifying the account ID and report type, enabling effective management of courses, assignments, enrollments, and grades.

Instructions

Generate a report for an account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYesID of the account
parametersNoReport parameters
reportYesType of report to generate

Implementation Reference

  • The main handler for the 'canvas_create_account_report' tool in the MCP server's CallToolRequestSchema handler. Validates input and calls CanvasClient.createAccountReport.
    case "canvas_create_account_report": {
      const createReportArgs = args as unknown as CreateReportArgs;
      if (!createReportArgs.account_id || !createReportArgs.report) {
        throw new Error("Missing required fields: account_id and report");
      }
      
      const report = await this.client.createAccountReport(createReportArgs);
      return {
        content: [{ type: "text", text: JSON.stringify(report, null, 2) }]
      };
    }
  • src/index.ts:809-820 (registration)
    Tool registration entry in the TOOLS array, defining name, description, and input schema for listTools.
      name: "canvas_create_account_report",
      description: "Generate a report for an account",
      inputSchema: {
        type: "object",
        properties: {
          account_id: { type: "number", description: "ID of the account" },
          report: { type: "string", description: "Type of report to generate" },
          parameters: { type: "object", description: "Report parameters" }
        },
        required: ["account_id", "report"]
      }
    }
  • TypeScript interface defining the input parameters for createAccountReport, matching the tool's inputSchema.
    export interface CreateReportArgs {
      account_id: number;
      report: string;
      parameters?: Record<string, any>;
    }
  • Core CanvasClient method that makes the API POST request to create an account report.
    async createAccountReport(args: CreateReportArgs): Promise<CanvasAccountReport> {
      const { account_id, report, parameters } = args;
      const response = await this.client.post(`/accounts/${account_id}/reports/${report}`, {
        parameters: parameters || {}
      });
      return response.data;
    }
  • TypeScript interface for the CanvasAccountReport return type.
    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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Generate a report' implies a read-only or data-processing operation, but it does not specify if this is a creation/mutation (e.g., generating a new report file) or a retrieval, nor does it detail permissions, side effects, or output format. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and easy to parse, though it could benefit from more detail to improve clarity and completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (3 parameters, including a nested object for 'parameters'), lack of annotations, and no output schema, the description is insufficient. It does not explain what the report generation entails, what the output might be, or how to use the parameters effectively, leaving users with incomplete context for proper tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for 'account_id', 'parameters', and 'report'. The description does not add any meaning beyond the schema, such as explaining what 'parameters' might include or what 'report' types are available. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, but no extra value is provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose as 'Generate a report for an account', which includes a verb ('Generate') and resource ('report for an account'), making it clear what it does at a high level. However, it lacks specificity about what kind of report or what the report entails, and it does not differentiate from siblings like 'canvas_get_account_reports', which might retrieve existing reports rather than generate new ones.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, context, or exclusions, such as when to use 'canvas_get_account_reports' for retrieving reports instead. Without this, users must infer usage from the tool name and schema alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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