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 and project use full-replace semantics, so always pass both.

Parameters

NameTypeRequiredDefaultDescription
context_item_idstring (uuid)YesThe context item to update
refresh_webpagebooleanNoSet `true` to re-pull a `webpage` item's content from its stored URL. Ignores `name` / `content` / `import_url`. Errors on non-webpage items. Admin/editor only
namestringNoIf provided, updates the name. Omit to leave unchanged. Ignored when `refresh_webpage` is true
contentstringNoNew markdown body. Omit to leave unchanged. Triggers RAG re-embedding. Mutually exclusive with `import_url`. Ignored when `refresh_webpage` is true
import_urlstringNoPublic URL — backend fetches and converts to clean markdown server-side, then stores it as a fresh one-off snapshot body. Mutually exclusive with `content`. Ignored when `refresh_webpage` is true
collection_idinteger | nullYesFull replace. Omitting the key is a `400` (`Missing param: collection_id`). Pass the current ID to keep the item in its collection, a different ID to move it, or `null` (`0` works too) to move it back to the top level of the Reference Library. Not read at all when `refresh_webpage` is true, so it is not required on that branch
project_idstring (uuid) | nullNoFull replace, with no leave-unchanged option — the one field on this tool that can lose data. Omitting the key is identical to passing `null`: the item is DETACHED from its project, and the call still returns 200 so nothing warns you. Read the current value with `get_context_item` and pass it back on every call to keep the item where it is; pass a different ID to move it, and pass `null` only when you mean to detach. Not read at all when `refresh_webpage` is true

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 is attached to AFTER the update — full-replace, with NO \"leave unchanged\" option, and the one field on this tool that can lose data. Omitting the key is treated identically to passing null: the item is DETACHED from whatever project it was in, and the call still returns 200 so nothing warns you. To keep the item where it is you must read its current project_id (get_context_item) and pass that value back on every call; pass a different ID to move it (the project must belong to the same team), and pass null only when you intend to detach it. 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",
      "description": "Context item ID."
    },
    "name": {
      "type": "string",
      "description": "Updated context item name."
    },
    "content": {
      "type": "string",
      "description": "Updated reference content."
    },
    "link_url": {
      "type": "string",
      "description": "Direct URL to view this context item in the Marcora app."
    },
    "project_id": {
      "type": [
        "string",
        "null"
      ],
      "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": {
      "type": "string",
      "description": "RAG re-processing status (unprocessed, provisional, complete). Flips 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: move to a different collection, or pass null to move it back to the top level of the Reference Library
  • project_id: change the project association, or pass null to disassociate
  • refresh_webpage: set true to re-pull a tracked webpage item from its stored URL (admin/editor only; ignores name / content / import_url)

Important — full-replace semantics for collection_id and project_id:
Unlike name and content, neither field has a "leave unchanged" option — whatever you send becomes the item's placement. collection_id is required on a normal update; project_id is not schema-required, but you should still send it on every call, because omitting it does exactly what passing null does. Include the current values to preserve them. If you do not know the current values, call get_context_item first or use the web app to check before updating. (Exception: when refresh_webpage is true neither field is read at all — collection_id is not required on that branch, and the item's project and collection are left exactly as they were.)

The two behave differently when omitted, so pass both explicitly: omitting collection_id returns a Missing param error, while omitting project_id silently detaches the item from its project.

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. Use it to move an item out of a collection and back to the top level of the Reference Library, or to detach it from a project. For collection_id, 0 is accepted as an alias for null.

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) and project_id (not required, but omitting it detaches the item) — include current values to preserve, or null to clear.
  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

  • 400Provide either content or import_url, not both. (both were supplied)
  • 400Failed to extract markdown from import_url (the URL could not be fetched or parsed)
  • 400refresh_webpage used on a non-webpage item
  • 403refresh_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"
Scroll to Top