update_context
Updates an existing context item in the team's reference library: rename it, replace its body, re-pull a tracked web page, or move it between collections and projects.
Project and collection placement are independent: an item can sit in a project AND a collection at once. Moving an item into a collection changes collection_id only.
collection_idis REQUIRED (the key must be present; omitting it is a 400). Pass the current id to keep the item in its collection, a different id to move it, or null (or 0) to move it to the loose reference library.project_id: omit it to leave the item's project exactly as it is. Pass a project id to move it to that project. Pass null ONLY when the user asked to take the item out of its project.
Body and name (patch-style; omit to leave alone):
name: new name.content: new markdown body; triggers re-embedding.import_url: a public URL fetched once and converted to markdown server-side, replacing the body with a one-off snapshot. Use it instead ofcontentfor a large new body.contentandimport_urlare mutually exclusive.
refresh_webpage: true re-pulls a tracked web page from its stored URL (the app's refresh button). Valid only for items added with add_context connected_webpage_url (content_type "webpage"); requires admin or editor role. On that branch name / content / import_url are ignored, collection_id is not required, and the item's project and collection stay exactly as they were.
Find ids with list_context_items, list_context_collections, get_project or get_relevant_context. Present link_url exactly as returned.
Input semantics:
context_item_id: REQUIRED. The UUID of the context item to update.
refresh_webpage: OPTIONAL boolean. On any item other than a "webpage" item it returns a clear error.
name: OPTIONAL. Ignored when refresh_webpage is true.
content: OPTIONAL. Ignored when refresh_webpage is true.
import_url: OPTIONAL. Uses AI main-content extraction (the same engine as connected_webpage_url: it isolates the primary page/article body and drops nav and boilerplate). It is a one-off snapshot; to keep a web-page item in sync with its URL, use refresh_webpage instead. Ignored when refresh_webpage is true.
collection_id: REQUIRED (its value may be null).
project_id: OPTIONAL. Omit to leave the project unchanged; a project id moves the item there; null detaches it (only when the user asked).
If the context item has a linked editor document, its title, content and word_count are auto-synced and a realtime update is broadcast to open editors.
Links: copy link_url character for character. Never retype, shorten, or rebuild a link or the IDs inside it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"context_item_id": "<context_item_id>",
"collection_id": "<collection_id>"
},
"name": "update_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | 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 | No | 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 | No | 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 | No | 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 | Yes | 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 | 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_webpage | No | 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
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Context item ID | |
| name | No | Updated context item name | |
| content | No | Updated reference content | |
| link_url | No | URL to view this context item in the Marcora web app. | |
| project_id | No | Project this item is associated with (null if none) | |
| updated_at | No | Unix timestamp of last update | |
| word_count | No | Word count of updated content | |
| content_type | No | manual or webpage | |
| collection_id | No | Collection this item belongs to (null if none) | |
| content_intro | No | Truncated content intro used in listings | |
| relevancy_processed_status | No | 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. |