MCP Tools
Context & Resources

update_context

Update an existing context item: change its name, body, collection, or project, or re-pull a tracked web page's content. collection_id is always required; omitting project_id keeps the item's project.

Parameters

NameTypeRequiredDefaultDescription
context_item_idstring (uuid)Yes—UUID of the reference item to update — required, and the only way to target the item. Get it from list_context_items, get_project, get_relevant_context, or the id returned by add_context. An unknown id returns not-found, and an item belonging to another team is rejected.
refresh_webpagebooleanNo—Set true to re-pull a tracked page's body from the URL stored when it was added — the same action as the refresh button in the app. It only works on items added via add_context connected_webpage_url; on anything else it returns an error telling you to use content or import_url instead. When true, name, content, and import_url are all ignored, and so are collection_id and project_id — this branch does not read them, so collection_id is not required here and the item stays in whatever project and collection it was already in. Defaults to false.
namestringNo—New display name for the item. Omit it to leave the current name untouched — this is not a rename-to-blank; only a value you actually pass takes effect. Changing the name re-embeds the item so retrieval matches the new wording. Ignored when refresh_webpage is true.
contentstringNo—Replacement markdown body — the complete new text, not a patch or an append. Omit it to leave the existing body alone; passing it re-embeds the item for retrieval and queues a re-check of anything that relied on the old text. Mutually exclusive with import_url (sending both → 400), and ignored when refresh_webpage is true.
import_urlstringNo—A publicly reachable URL that is fetched and converted to markdown, replacing the whole body with a fresh one-off snapshot — use it instead of content when the new body is large. Unlike add_context, this fetch happens inline, so the call takes longer and returns a 400 if extraction fails; it is a snapshot only, so to keep a tracked page in sync use refresh_webpage instead. Mutually exclusive with content (both → 400), and ignored when refresh_webpage is true.
collection_idinteger | nullYes—The collection this item should sit in AFTER the update. You must send this key on every call — omitting it is a 400 ("Missing param: collection_id") — because it fully replaces the current value rather than merging. Pass the item's current collection ID to keep it where it is, a different ID to move it, or null (or 0) to move it back to the loose reference library; read the current value with get_context_item first if you don't know it. Not read at all when refresh_webpage is true, so it is not required on that branch.
project_idstring (uuid) | nullNo—The project this item sits in. Omit the key to leave the item's project unchanged: project and collection placement are independent, so moving an item into a collection does not touch this. Pass a project ID to move the item to that project (same team only). Pass null only when the user asked to take the item out of its project. Not read at all when refresh_webpage is true, so a refresh never moves the item.

Input Schema

{
  "type": "object",
  "required": [
    "context_item_id",
    "collection_id"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "New display name for the item. Omit it to leave the current name untouched — this is not a rename-to-blank; only a value you actually pass takes effect. Changing the name re-embeds the item so retrieval matches the new wording. Ignored when refresh_webpage is true."
    },
    "content": {
      "type": "string",
      "description": "Replacement markdown body — the complete new text, not a patch or an append. Omit it to leave the existing body alone; passing it re-embeds the item for retrieval and queues a re-check of anything that relied on the old text. Mutually exclusive with import_url (sending both → 400), and ignored when refresh_webpage is true."
    },
    "import_url": {
      "type": "string",
      "description": "A publicly reachable URL that is fetched and converted to markdown, replacing the whole body with a fresh one-off snapshot — use it instead of content when the new body is large. Unlike add_context, this fetch happens inline, so the call takes longer and returns a 400 if extraction fails; it is a snapshot only, so to keep a tracked page in sync use refresh_webpage instead. Mutually exclusive with content (both → 400), and ignored when refresh_webpage is true."
    },
    "project_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The project this item sits in. Omit the key to leave the item's project unchanged: project and collection placement are independent, so moving an item into a collection does not touch this. Pass a project ID to move the item to that project (same team only). Pass null only when the user asked to take the item out of its project. Not read at all when refresh_webpage is true, so a refresh never moves the item."
    },
    "collection_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The collection this item should sit in AFTER the update. You must send this key on every call — omitting it is a 400 (\"Missing param: collection_id\") — because it fully replaces the current value rather than merging. Pass the item's current collection ID to keep it where it is, a different ID to move it, or null (or 0) to move it back to the loose reference library; read the current value with get_context_item first if you don't know it. Not read at all when refresh_webpage is true, so it is not required on that branch."
    },
    "context_item_id": {
      "type": "string",
      "format": "uuid",
      "description": "UUID of the reference item to update — required, and the only way to target the item. Get it from list_context_items, get_project, get_relevant_context, or the id returned by add_context. An unknown id returns not-found, and an item belonging to another team is rejected."
    },
    "refresh_webpage": {
      "type": "boolean",
      "description": "Set true to re-pull a tracked page's body from the URL stored when it was added — the same action as the refresh button in the app. It only works on items added via add_context connected_webpage_url; on anything else it returns an error telling you to use content or import_url instead. When true, name, content, and import_url are all ignored, and so are collection_id and project_id — this branch does not read them, so collection_id is not required here and the item stays in whatever project and collection it was already in. Defaults to false."
    }
  }
}

Output Schema

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Context item ID"
    },
    "name": {
      "type": "string",
      "description": "Updated context item name"
    },
    "content": {
      "type": "string",
      "description": "Updated reference content"
    },
    "link_url": {
      "type": "string",
      "description": "URL to view this context item in the Marcora web app."
    },
    "project_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Project this item is associated with (null if none)"
    },
    "updated_at": {
      "type": "integer",
      "description": "Unix timestamp of last update"
    },
    "word_count": {
      "type": "integer",
      "description": "Word count of updated content"
    },
    "content_type": {
      "type": "string",
      "description": "manual or webpage"
    },
    "collection_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Collection this item belongs to (null if none)"
    },
    "content_intro": {
      "type": "string",
      "description": "Truncated content intro used in listings"
    },
    "relevancy_processed_status": {
      "enum": [
        "unprocessed",
        "provisional",
        "complete"
      ],
      "type": "string",
      "description": "Targeting-dimension processing state, for reference-library items only. Omitted entirely for items that belong to a project or a context collection. This does NOT indicate whether the item is embedded or retrievable — every context item is embedded for semantic search at ingestion regardless of this value. Reset to 'unprocessed' whenever name or content changes."
    }
  }
}

Instructions

Use this tool to update an existing context item in your reference library.

What you can update:

  • name: rename the context item (omit to leave unchanged)
  • content: replace the stored reference content (omit to leave unchanged; triggers RAG re-embedding)
  • import_url: replace the body with a fresh one-off snapshot fetched from a public URL (omit to leave unchanged; mutually exclusive with content)
  • collection_id: required on every call. Pass the item's current collection ID to keep it where it is, a different ID to move it, or null (or 0) to move it back to the top level of the Reference Library
  • project_id: optional. Omit it to leave the item's project exactly as it is. Pass a project ID to move the item to that project (same team only). Pass null only when the user asked to take the item out of its project
  • refresh_webpage: set true to re-pull a tracked webpage item from its stored URL (admin/editor only; ignores name / content / import_url)

Placement — project and collection are independent:
An item can sit in a project and a collection at the same time. Moving an item into a collection changes collection_id only, so do not send project_id: null for that; it would take the item out of its project. Omitting project_id keeps the item's project.

collection_id is still required: omitting it returns a 400 (Missing param: collection_id). If you do not know the item's current collection, call get_context_item first. (Exception: when refresh_webpage is true neither field is read, collection_id is not required, and the item's project and collection are left exactly as they were.)

Passing null:
Both fields accept a JSON null — the tool's input schema types them as ["integer","null"] / ["string","null"], so strict MCP clients can send null directly. For collection_id, null (or 0) moves the item out of a collection and back to the top level of the Reference Library. For project_id, null takes the item out of its project, so use it only when the user asked for that.

Workflow:

  1. Get the context_item_id (UUID) — use list_context_items, list_context_collections, get_project, or get_relevant_context to find IDs.
  2. Pass collection_id (required, nullable). Pass project_id only if you are moving the item to a different project, or the user asked to take it out of its project.
  3. Optionally pass name and/or a new body (content or import_url) to update those fields, or refresh_webpage: true to re-pull a tracked web page.

Errors

  • 400 — Provide either content or import_url, not both. (both were supplied)
  • 400 — Failed to extract markdown from import_url (the URL could not be fetched or parsed)
  • 400 — refresh_webpage used on a non-webpage item
  • 403 — refresh_webpage requires admin or editor role

Example prompts

  • "Rename that brand voice context item to 'Brand Voice v2'"
  • "Move the competitive analysis out of the 'Archive' collection"
  • "Update our pricing context with the new Enterprise tier info"
  • "I updated our pricing page — refresh that web-page context item"
  • "Re-import the Acme snapshot from https://example.com/competitor-pricing"

Links: present link_url to the user exactly as returned — copy it character for character. Never retype, shorten, or rebuild a link or the IDs inside it.

Scroll to Top