add_context
Add a new reference item to your context library, the source material that powers on-brand AI generation. Supply the body as pasted markdown, a one-off URL import, or a tracked live web page, and optionally file it under a collection or project.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Short, descriptive label for this reference item, shown in the library list and used when the AI cites it — make it specific enough to tell similar items apart ("Q3 Pricing Page" rather than "Pricing"). Required. When tracking a live web page, an empty name falls back to the page's own title. |
content | string | No | — | The item's body as markdown, pasted inline. Best for short or hand-authored material — it is stored as-is and embedded for retrieval immediately, so the item is usable the moment the call returns. Exactly one of content, import_url, or connected_webpage_url must be set; sending none, or more than one, is rejected with a 400 (an empty string counts as not set). |
import_url | string | No | — | A publicly reachable URL to fetch ONCE and store as a static markdown snapshot; the URL itself is not kept, so the item can never be refreshed. Use it for one-off material — a competitor's post, an exported doc behind a temporary link. Exactly one of content, import_url, or connected_webpage_url may be set (none or two-plus → 400), and the fetch runs in the background: the call returns straight away with import_status "processing", so poll get_context_item with the returned id until the body lands. |
connected_webpage_url | string | No | — | A URL to track as a live page: the page is fetched and its URL is stored, so the item can be re-pulled later with update_context refresh_webpage. Use it for the customer's own pages and anything you want to keep current; re-adding a URL the team already tracks updates that item in place rather than creating a duplicate. Exactly one of content, import_url, or connected_webpage_url may be set (none or two-plus → 400), and adding a tracked page requires an admin or editor role. |
collection_id | integer | null | No | — | Numeric ID of the collection to file this item in, from list_context_collections or create_context_collection. Omit it (or pass null or 0) to leave the item loose in the reference library. The collection must belong to your team, and a private collection must be one you created — otherwise the call is rejected. |
project_id | string | No | — | UUID of a project to attach this item to, from list_projects, so it shows up as that project's reference material. Omit it to leave the item unattached to any project. The project must belong to your team or the call fails, and users with the collaborator role can only add reference material inside a project, so for them this is effectively required. |
Input Schema
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Short, descriptive label for this reference item, shown in the library list and used when the AI cites it — make it specific enough to tell similar items apart (\"Q3 Pricing Page\" rather than \"Pricing\"). Required. When tracking a live web page, an empty name falls back to the page's own title."
},
"content": {
"type": "string",
"description": "The item's body as markdown, pasted inline. Best for short or hand-authored material — it is stored as-is and embedded for retrieval immediately, so the item is usable the moment the call returns. Exactly one of content, import_url, or connected_webpage_url must be set; sending none, or more than one, is rejected with a 400 (an empty string counts as not set)."
},
"import_url": {
"type": "string",
"description": "A publicly reachable URL to fetch ONCE and store as a static markdown snapshot; the URL itself is not kept, so the item can never be refreshed. Use it for one-off material — a competitor's post, an exported doc behind a temporary link. Exactly one of content, import_url, or connected_webpage_url may be set (none or two-plus → 400), and the fetch runs in the background: the call returns straight away with import_status \"processing\", so poll get_context_item with the returned id until the body lands."
},
"project_id": {
"type": "string",
"format": "uuid",
"description": "UUID of a project to attach this item to, from list_projects, so it shows up as that project's reference material. Omit it to leave the item unattached to any project. The project must belong to your team or the call fails, and users with the collaborator role can only add reference material inside a project, so for them this is effectively required."
},
"collection_id": {
"type": [
"integer",
"null"
],
"description": "Numeric ID of the collection to file this item in, from list_context_collections or create_context_collection. Omit it (or pass null or 0) to leave the item loose in the reference library. The collection must belong to your team, and a private collection must be one you created — otherwise the call is rejected."
},
"connected_webpage_url": {
"type": "string",
"description": "A URL to track as a live page: the page is fetched and its URL is stored, so the item can be re-pulled later with update_context refresh_webpage. Use it for the customer's own pages and anything you want to keep current; re-adding a URL the team already tracks updates that item in place rather than creating a duplicate. Exactly one of content, import_url, or connected_webpage_url may be set (none or two-plus → 400), and adding a tracked page requires an admin or editor role."
}
}
}Output Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Context item ID"
},
"name": {
"type": "string",
"description": "Context item name"
},
"content": {
"type": "string",
"description": "The stored reference content. For imported items, `content` is empty in the immediate response — fetch the item with `get_context_item` to read the full body."
},
"link_url": {
"type": "string",
"format": "uri",
"description": "Direct URL to view this context item in the Marcora app"
},
"created_at": {
"type": "integer",
"description": "Unix timestamp of creation"
},
"project_id": {
"type": [
"string",
"null"
],
"format": "uuid",
"description": "Project association (null if none)"
},
"word_count": {
"type": "integer",
"description": "Word count of content"
},
"content_type": {
"type": "string",
"description": "manual (from content / import_url) or webpage (from connected_webpage_url)"
},
"collection_id": {
"type": [
"integer",
"null"
],
"description": "Collection this item belongs to (null if none)"
},
"import_status": {
"type": "string",
"description": "For import_url items, the load state: `\"processing\"` immediately after the call, `\"ready\"` once the content has finished loading. Empty for pasted content and web pages."
}
}
}Instructions
Use this tool to add a new context item to your reference library.
Workflow:
- Provide a descriptive
name. - Provide exactly one body source:
content(markdown directly),import_url(a public URL imported once as a static snapshot), orconnected_webpage_url(a public URL tracked as a live, refreshable web page).connected_webpage_urlrequires admin or editor role. - Optionally assign to a collection by passing
collection_id. Uselist_context_collectionsto see existing collections and their IDs, or usecreate_context_collectionto create a new one and get its ID. Omit it — or pass0— to file the item at the top level of the Reference Library. - Optionally associate with a project by passing
project_id. Uselist_projectsto see available projects and their IDs. Omit it to leave the item unassociated.
Filing an item in the Reference Library: omitting
collection_id— or passing0— files the item at the top level of the Reference Library, where it's returned bylist_context_items, fetchable viaget_context_item, and eligible for semantic search. This is the normal path for team-wide reference material.Unlike
update_context, this tool'scollection_idis typed as a bareintegerin the input schema, so a strict MCP client cannot send a literalnullhere. You don't need one:collection_idis optional onadd_context, so simply omitting it is the idiomatic way to file at the top level. (The server treats an explicitnullthe same as omitted/0, but only clients that don't validate against the schema can send it.)
Use context items for: brand voice guidelines, company facts, product descriptions, audience personas, competitive intelligence.
Errors
400— exactly one ofcontent,import_url, orconnected_webpage_urlis required (none, or more than one, was supplied)400—connected_webpage_urlcould not be fetched or parsed (check the URL is publicly reachable)403—connected_webpage_urlrequires admin or editor role
Example prompts
- "Add our brand guidelines to Marcora"
- "Store this competitive analysis as context"
- "Import https://example.com/competitor-pricing as a one-off snapshot called 'Acme pricing'"
- "Track our pricing page (https://example.com/pricing) as a web page so I can refresh it later"
- "Add this product brief to the 'Product Launch' collection"
Examples
Add competitor research to a project
Store competitor analysis as context tied to a specific project, so content generated for that project can reference competitive positioning.
{
"name": "Q2 Competitor Analysis — Acme Corp",
"content": "Acme Corp launched a freemium tier in March. Their messaging focuses on speed and simplicity. Key weakness: no enterprise SSO support.",
"project_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Q2 Competitor Analysis — Acme Corp",
"content": "Acme Corp launched a freemium tier in March...",
"word_count": 27,
"project_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"created_at": 1712678400
}