Skip to main content

Use Canvas content with MCP

Use Glean's MCP tools to bring existing Canvas content into another AI app and save changes back to the same item in Glean. Each successful edit creates a new version while keeping the Library URL unchanged.

note

Canvas content is available through MCP tools. It isn't listed as an MCP resource through resources/list. The tool names use artifact for content saved from Canvas to Library.

Prerequisites

  • Connect your host to a Glean MCP server.
  • Confirm that the server exposes search and read_document (the default Glean MCP server includes both tools).
  • For edit access, ask your admin to add the Artifacts toolset to the server, which includes create_artifact, edit_artifact, and share_artifact.
  • Confirm that you can view the Canvas content and have edit access if you plan to change it.

Admins and MCP Server Moderators can add the toolset when they create or edit an MCP server.

Read Canvas content

Use the Library URL when you know which Canvas item you need:

  1. Open the content in Canvas or Library and click Share → Copy link. The URL ends with /library/{artifact-id}.
  2. Give the URL to your MCP host and ask it to use Glean to read the content.
  3. Continue your task in the host. The host uses read_document to retrieve the latest version as context.

For example:

Use Glean to read this Canvas content and use it as context for my next request:
https://app.glean.com/library/{artifact-id}

If you don't have the URL, ask the host to use search to find the item by title, creator, or topic, then use read_document on the result. Content shared by link without search visibility won't appear in search, so provide its Library URL directly.

Edit Canvas content

Have the host read the latest version before it makes a change. The artifact ID required by edit_artifact is the final segment of the Library URL.

For example:

Use Glean to read https://app.glean.com/library/{artifact-id}.
Update the executive summary to include the launch date, keep all other sections unchanged,
and save the update to the same Canvas content.

The host calls read_document, makes the requested change, and passes the artifact ID and updated content to edit_artifact. The edit creates a new version at the same Library URL.

edit_artifact supports documents, email drafts, messages, interactive artifacts (HTML), meeting notes, images, spreadsheets, and slides.

Preserve the current content

For documents and other text-based content, edit_artifact replaces the full body. Read the current version first and tell the host to preserve everything outside the requested change.

If another edit is saved after the host reads the item, edit_artifact rejects the update. Ask the host to read the latest version and retry.

Permissions and sharing

Your MCP connection uses your Glean identity and permissions:

  • search and read_document return only content that you can view
  • edit_artifact requires edit access, not view access
  • create_artifact saves new content to your Library, with you as the owner
  • share_artifact grants view access when sharing is enabled for your organization

An MCP host can't use these tools to bypass Canvas permissions. Sharing through MCP also requires Chat Sharing to be enabled.

Troubleshooting

See also