Canvas ACTION
Update Assignment
Update an assignment. See the documentation
- Action
- Writes data
- Destructive
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Canvas account once, then configure and run Update Assignment from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "canvas-update-assignment",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
canvas: { authProvisionId: "apn_xxxxxxx" },
accountId: "Account ID",
userId: "User ID",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "canvas-update-assignment",
"configured_props": {
"canvas": { "authProvisionId": "apn_xxxxxxx" },
"accountId": "Account ID",
"userId": "User ID"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "canvas",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "canvas-update-assignment",
arguments: {
accountId: "Account ID",
userId: "User ID",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
accountId Account ID | string | The ID of an account Required Dynamic |
userId User ID | string | The ID of a user Required Dynamic |
courseId Course ID | string | The ID of a course Required Dynamic |
assignmentId Assignment ID | string | The ID of an assignment Required Dynamic |
name Name | string | The name of the assignment Optional |
description Description | string | The description of the assignment, supports HTML Optional |
submissionType Submission Type | string | The type of submission for the assignment Optional |
notifyOfUpdate Notify of Update | boolean | Whether to notify the students of the update Optional |
pointsPossible Points Possible | integer | The maximum points possible on the assignment Optional |
gradingType Grading Type | string | The strategy used for grading the assignment. The assignment defaults to “points” if this field is omitted. Optional |
dueAt Due At | string | The day/time the assignment is due. Accepts times in ISO 8601 format, e.g. 2014-10-21T18:48:00Z. Optional |
omitFromFinalGrade Omit From Final Grade | boolean | Whether this assignment is counted towards a student's final grade. Optional |
allowedAttempts Allowed Attempts | integer | The number of submission attempts allowed for this assignment. Set to -1 for unlimited attempts. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- canvas-update-assignment
- Version
- 0.0.2
- App
- Canvas
- Authentication
- API key
- Read-only
- No
- Destructive
- Yes
- Open world
- Yes
- Source
- View on GitHub ↗