canvas_create_conversation
Initiate a new conversation in Canvas LMS by specifying recipients, a message body, and an optional subject, enabling direct and organized communication within the platform.
Instructions
Create a new conversation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Message body | |
| recipients | Yes | Recipient user IDs or email addresses | |
| subject | No | Message subject |
Implementation Reference
- src/index.ts:670-686 (registration)Registers the canvas_create_conversation tool in the MCP server's TOOLS array with its input schema and description.{ name: "canvas_create_conversation", description: "Create a new conversation", inputSchema: { type: "object", properties: { recipients: { type: "array", items: { type: "string" }, description: "Recipient user IDs or email addresses" }, body: { type: "string", description: "Message body" }, subject: { type: "string", description: "Message subject" } }, required: ["recipients", "body"] } },
- src/index.ts:670-686 (schema)Defines the input schema for validating parameters to the canvas_create_conversation tool (recipients array, body string, optional subject).{ name: "canvas_create_conversation", description: "Create a new conversation", inputSchema: { type: "object", properties: { recipients: { type: "array", items: { type: "string" }, description: "Recipient user IDs or email addresses" }, body: { type: "string", description: "Message body" }, subject: { type: "string", description: "Message subject" } }, required: ["recipients", "body"] } },
- src/client.ts:515-522 (handler)Executes the core logic for creating a Canvas conversation by making authenticated POST request to Canvas Conversations API endpoint.async createConversation(recipients: string[], body: string, subject?: string): Promise<CanvasConversation> { const response = await this.client.post('/conversations', { recipients, body, subject }); return response.data; }
- src/client.ts:515-522 (helper)CanvasClient helper method invoked by MCP tool handler to perform the actual API call for creating conversations.async createConversation(recipients: string[], body: string, subject?: string): Promise<CanvasConversation> { const response = await this.client.post('/conversations', { recipients, body, subject }); return response.data; }
- src/types.ts:423-443 (schema)TypeScript interface defining the structure of CanvasConversation response object used by the tool.export interface CanvasConversation { id: number; subject: string; workflow_state: 'read' | 'unread' | 'archived'; last_message: string; last_message_at: string; last_authored_message: string; last_authored_message_at: string; message_count: number; subscribed: boolean; private: boolean; starred: boolean; properties: string[]; audience: number[]; audience_contexts: { [key: string]: string[]; }; avatar_url: string; participants: CanvasConversationParticipant[]; messages?: CanvasConversationMessage[]; }