Skip to main content
Glama

Update Discussion Topic

update_discussion_topic
DestructiveIdempotent

Update an existing Canvas discussion topic or announcement, including title, body, publish state, pinning, and locking. Edit one fragment safely or guard against overwriting changed content.

Instructions

Update an existing discussion topic or announcement.

message replaces the whole body. To change one fragment, pass find and replace instead. Optional guards (any of them makes the tool fetch the topic first, refuse rather than write on a failed check, and read it back after): expect_body_sha256 refuses if the message changed since you read it (Canvas gives topics no updated_at, so expect_updated_at is rejected); find/replace edits one fragment of the current message; require lists strings that must already be present in it.

Every update checks the topic through REST before writing. Anonymous topics cannot be updated here; use the Canvas UI instead. The optional GraphQL fallback is for reads only.

Input Schema

NameRequiredDescriptionDefault
findNoExact HTML fragment that must occur exactly once in the current message
titleNoNew title
lockedNoLock or unlock the topic
pinnedNoPin or unpin the topic
lock_atNoISO 8601 datetime to auto-lock the discussion
messageNoNew body content (HTML supported)
replaceNoText that replaces find (may be empty to delete it)
requireNoStrings that must already be present in the current message
topic_idYesDiscussion topic ID
publishedNoPublish or unpublish the topic
delayed_post_atNoISO 8601 datetime to schedule posting
course_identifierYesCourse code or Canvas ID
expect_updated_atNoNot supported: Canvas returns no updated_at for discussion topics. Use expect_body_sha256 instead.
expect_body_sha256NoSHA-256 (hex) of the message as Canvas returned it when you read it; refuse if the message has changed. Each guarded edit reports the new hash for the next edit.
require_initial_postNoStudents must post before seeing others

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.15.0
    • addedInput schema / properties / expect_body_sha256
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "SHA-256 (hex) of the message as Canvas returned\nit when you read it; refuse if the message has changed. Each\nguarded edit reports the new hash for the next edit."
      +}
    • addedInput schema / properties / expect_updated_at
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Not supported: Canvas returns no updated_at for\ndiscussion topics. Use expect_body_sha256 instead."
      +}
    • addedInput schema / properties / find
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Exact HTML fragment that must occur exactly once in the current message"
      +}
    • addedInput schema / properties / replace
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Text that replaces find (may be empty to delete it)"
      +}
    • addedInput schema / properties / require
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Strings that must already be present in the current message"
      +}
  2. Changed1 schema field changedv1.10.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "type": "object",
      -  "x-fastmcp-wrap-result": true
      -}New value: +null
  3. Addedv1.8.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond annotations, the description discloses that every update checks the topic through REST before writing, that optional guards fetch first, refuse on failure, and read back after. It also explains the lack of updated_at, the SHA-256 guard behavior, and that the GraphQL fallback is read-only.

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

Conciseness5/5

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

The description is front-loaded with the core action and immediately explains the message-vs-fragment editing model before listing guard details. Every sentence adds useful operational context without redundant restatement.

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

Completeness5/5

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

For a 15-parameter destructive update with no output schema, the description covers the critical safety and workflow details: REST pre-check, guard behavior, anonymous-topic limitation, and read-back reporting. An agent has enough information to invoke it correctly and avoid unsafe writes.

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

Parameters4/5

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

With 100% schema description coverage, the schema already documents each parameter. The description still adds meaningful workflow semantics for the complex parameters: message vs find/replace, guard behavior, and why expect_updated_at is rejected in favor of expect_body_sha256.

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

Purpose4/5

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

The description states a specific verb and resource: update an existing discussion topic or announcement. It clearly distinguishes updating from creation/listing via the verb and the word existing, though it does not explicitly name sibling tools such as create_discussion_topic.

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

Usage Guidelines5/5

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

It explicitly says message replaces the whole body and directs fragment edits to find/replace instead. It also states a clear when-not case: anonymous topics cannot be updated here and should be handled in the Canvas UI.

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

Deploy Server

Other Tools