Context RepoContext Repo Docs
MCP Server

Tools Reference

Complete reference for all 26 MCP tools — exact parameters, types, and usage examples organized by category.

This page documents every tool available through the Context Repo MCP Server. Each tool listing includes its exact parameters, types, and a brief usage example.

All tools require authentication. If you haven't connected your AI assistant yet, see the setup guides to get started.

Parameters marked Required must be provided. Optional parameters can be omitted — the server uses sensible defaults.

User Info

get_user_info

Get your Context Repo account details including name, email, and profile image.

Parameters

None.

Example Usage

"What's my Context Repo account info?"

Returns your user ID, first name, last name, email address, and profile image URL.


Prompts

list_prompts

List all prompts in your workspace with optional filtering.

Parameters

ParameterTypeRequiredDescription
searchstringNoFilter prompts by title or description
limitnumberNoMaximum number of prompts to return (default: 20)

Example Usage

"List my prompts about code review"

Returns each prompt's title, description, engine, public/private status, current version, and ID.


get_prompt

Get the full content of a specific prompt including its template variables.

Parameters

ParameterTypeRequiredDescription
promptIdstringYesThe unique ID of the prompt to retrieve

Example Usage

"Show me the details of prompt abc123"

Returns the prompt's title, description, engine, version number, public/private status, full content, and any ${variables} defined in the template.


create_prompt

Create a new prompt template. You can include variables using ${variableName} syntax in the content.

Parameters

ParameterTypeRequiredDescription
titlestringYesTitle of the prompt
descriptionstringYesBrief description of what the prompt does
contentstringYesThe prompt template content. Use ${variableName} for variables.
enginestringYesTarget AI model (e.g., "gpt-4", "claude-3", "gemini-pro")

Example Usage

"Create a prompt called 'Bug Report Template' for gpt-4 that asks for a summary, steps to reproduce, and expected behavior"

Returns the new prompt's ID and engine.


update_prompt

Update an existing prompt. Only provide the fields you want to change — everything else stays the same.

Parameters

ParameterTypeRequiredDescription
promptIdstringYesThe unique ID of the prompt to update
titlestringNoNew title
descriptionstringNoNew description
contentstringNoNew content
changeLogstringNoDescription of what changed (saved in version history)

Example Usage

"Update prompt abc123 to add a section about error handling, and note 'Added error handling section' in the changelog"

Returns the updated prompt's title and new version number.


delete_prompt

Permanently delete a prompt. This can't be undone.

Parameters

ParameterTypeRequiredDescription
promptIdstringYesThe unique ID of the prompt to delete

Example Usage

"Delete prompt abc123"

Returns a confirmation message.

Deletion is permanent. Make sure you don't need the prompt or its version history before deleting.


get_prompt_versions

View a prompt's complete version history with change logs.

Parameters

ParameterTypeRequiredDescription
promptIdstringYesThe unique ID of the prompt

Example Usage

"Show me the version history for prompt abc123"

Returns each version's number, ID, author, change log entry, and a content preview.


restore_prompt_version

Restore a prompt to a previous version. This creates a new version with the restored content — it doesn't overwrite history.

Parameters

ParameterTypeRequiredDescription
promptIdstringYesThe unique ID of the prompt
versionIdstringYesThe ID of the version to restore (from get_prompt_versions)

Example Usage

"Restore prompt abc123 to version xyz789"

Returns the new version number after restoration.


Documents

list_documents

List all documents in your workspace with optional filtering.

Parameters

ParameterTypeRequiredDescription
searchstringNoFilter documents by title
limitnumberNoMaximum number of documents to return (default: 20)

Example Usage

"List my documents about machine learning"

Returns each document's title, status, source type, creation date, and ID.


get_document

Get the full content of a specific document.

Parameters

ParameterTypeRequiredDescription
documentIdstringYesThe unique ID of the document to retrieve

Example Usage

"Show me document def456"

Returns the document's title, status, source type, source URL (if scraped), creation date, and full content.


create_document

Create a new text document with optional tags.

Parameters

ParameterTypeRequiredDescription
titlestringYesTitle of the document
contentstringYesThe document content (plain text or markdown)
tagsstring[]NoTags for categorizing the document

Example Usage

"Create a document called 'Meeting Notes - March 2026' with a summary of today's discussion, tagged with 'meetings' and 'engineering'"

Returns the new document's ID and tags.


update_document

Update an existing document. Only provide the fields you want to change.

Parameters

ParameterTypeRequiredDescription
documentIdstringYesThe unique ID of the document to update
titlestringNoNew title
contentstringNoNew content
changeLogstringNoDescription of what changed (saved in version history)

Example Usage

"Update document def456 with the revised introduction and log it as 'Rewrote introduction paragraph'"

Returns the updated document's title and new version number.


delete_document

Permanently delete a document. This can't be undone.

Parameters

ParameterTypeRequiredDescription
documentIdstringYesThe unique ID of the document to delete

Example Usage

"Delete document def456"

Returns a confirmation message.

Deletion is permanent. Make sure you don't need the document or its version history before deleting.


get_document_versions

View a document's complete version history with change logs.

Parameters

ParameterTypeRequiredDescription
documentIdstringYesThe unique ID of the document

Example Usage

"Show me the version history for document def456"

Returns each version's number, ID, title, author, change log entry, and a content preview.


restore_document_version

Restore a document to a previous version. This creates a new version with the restored content — it doesn't overwrite history.

Parameters

ParameterTypeRequiredDescription
documentIdstringYesThe unique ID of the document
versionIdstringYesThe ID of the version to restore (from get_document_versions)

Example Usage

"Restore document def456 to version xyz789"

Returns the new version number after restoration.


Collections

list_collections

List all collections in your workspace with optional filtering.

Parameters

ParameterTypeRequiredDescription
searchstringNoFilter collections by name
limitnumberNoMaximum number of collections to return (default: 20)

Example Usage

"List my collections"

Returns each collection's name, description, icon, color, item count, and ID.


get_collection

Get details of a specific collection, optionally including its items.

Parameters

ParameterTypeRequiredDescription
collectionIdstringYesThe unique ID of the collection to retrieve
includeItemsbooleanNoWhether to include the items in the collection (default: true)

Example Usage

"Show me the 'Frontend Prompts' collection with all its items"

Returns the collection's name, description, icon, color, item count, and (if includeItems is true) a list of all prompts and documents in the collection.


create_collection

Create a new collection to organize your prompts and documents.

Parameters

ParameterTypeRequiredDescription
namestringYesName of the collection
descriptionstringNoDescription of what the collection contains
colorstringNoColor code for the collection (e.g., "#f97316")
iconstringNoEmoji icon for the collection (e.g., "📁")

Example Usage

"Create a collection called 'Code Review' with a 🔍 icon and blue color #3b82f6"

Returns the new collection's ID, icon, and color.


update_collection

Update a collection's metadata. Only provide the fields you want to change.

Parameters

ParameterTypeRequiredDescription
collectionIdstringYesThe unique ID of the collection to update
namestringNoNew name for the collection
descriptionstringNoNew description
colorstringNoNew color code
iconstringNoNew emoji icon

Example Usage

"Rename the collection ghi789 to 'Code Quality' and change its icon to ✅"

Returns a confirmation with the updated collection name.


delete_collection

Delete a collection. The prompts and documents inside it aren't deleted — they remain in your workspace.

Parameters

ParameterTypeRequiredDescription
collectionIdstringYesThe unique ID of the collection to delete

Example Usage

"Delete collection ghi789"

Returns a confirmation message noting that the collection's contents weren't affected.

Deleting a collection only removes the grouping. Your prompts and documents stay in your workspace and can be added to other collections.


add_to_collection

Add prompts or documents to a collection. You can add multiple items at once.

Parameters

ParameterTypeRequiredDescription
collectionIdstringYesThe collection to add items to
itemIdsstring[]YesArray of document or prompt IDs to add
itemType"document" | "prompt"YesType of items being added

Example Usage

"Add prompts abc123 and abc456 to collection ghi789"

Returns the number of items added and how many were already in the collection.


remove_from_collection

Remove prompts or documents from a collection. The items themselves aren't deleted.

Parameters

ParameterTypeRequiredDescription
collectionIdstringYesThe collection to remove items from
itemIdsstring[]YesArray of document or prompt IDs to remove
itemType"document" | "prompt"YesType of items being removed

Example Usage

"Remove document def456 from collection ghi789"

Returns the number of items removed.


find_items

Search across prompts, documents, and collections using semantic similarity or keyword matching. This is the primary search tool — it returns item-level results (titles, IDs, relevance scores) across all content types.

For deep content exploration within documents, use Deep Search instead.

Parameters

ParameterTypeRequiredDescription
querystringYesThe search query
type"prompts" | "documents" | "collections" | "all"NoFilter results by type (default: "all")
semanticbooleanNoUse semantic search for natural language understanding (default: true). Set to false for exact literal matching.

Example Usage

"Find everything related to machine learning in my workspace"

Returns results grouped by type (prompts, documents, collections) with relevance scores for semantic search.

Semantic vs. keyword search: Semantic mode (the default) finds conceptually related content — searching for "ML training" will match documents about "machine learning models." Keyword mode does exact literal matching on titles and descriptions.


Deep Search is a set of 3 tools for progressively exploring document content. Unlike find_items (which returns item-level catalog results), Deep Search returns granular content fragments with structural hierarchy — sections, paragraphs, and navigation links.

The typical workflow: start with deep_search to find relevant passages, use deep_read to examine a chunk in detail, and deep_expand to navigate through the document's structure.

Search within document content using vector similarity and get ranked, hierarchical chunks with navigation links.

Parameters

ParameterTypeRequiredDescription
querystringYesThe search query for vector similarity matching
limitnumberNoMaximum number of results to return (default: 10)
sessionIdstringNoSession ID for result deduplication across searches. If omitted, an auto-session is created and reused.
collectionIdstringNoFilter results to a specific collection
documentIdstringNoFilter results to a specific document

Example Usage

"Deep search my documents for information about authentication best practices"

Returns ranked chunks, each with a chunkId, hierarchy level (document/section/paragraph), content preview, and navigation links (parent, siblings). Use the chunkId with deep_read or deep_expand to explore further.


deep_read

Read a single document chunk with full content and hierarchy metadata. Use this after deep_search to inspect a result in detail, or after deep_expand to examine a navigated chunk.

Parameters

ParameterTypeRequiredDescription
chunkIdstringYesThe chunk ID to read (from deep_search or deep_expand results)

Example Usage

"Read chunk abc123 in full"

Returns the chunk's complete text, structural position (section path, chunk index), navigation IDs (parent, previous sibling, next sibling), and content metadata (word count, heading text).


deep_expand

Navigate the document hierarchy from a chunk in 5 directions. Use this after deep_search to explore related content without re-searching.

Parameters

ParameterTypeRequiredDescription
chunkIdstringYesThe chunk ID to expand from (from deep_search or deep_expand results)
direction"up" | "down" | "next" | "previous" | "surrounding"YesNavigation direction
countnumberNoNumber of chunks to return

Directions

DirectionWhat it returns
upThe parent chunk (one level higher in the document hierarchy)
downChild chunks (one level deeper)
nextThe next sibling chunk at the same level
previousThe previous sibling chunk at the same level
surroundingA context window of nearby siblings

Example Usage

"Expand chunk abc123 downward to see its sub-sections"

Returns the chunks in the requested direction, each with its own chunkId for further navigation.