This document provides guidelines for AI assistants on how to effectively use Cursor-Cortex tools to access and manage information across projects.
To identify all available projects, run:
mcp_cursor-cortex_list_context_files(
projectName="cursor-cortex", // Your current project
listAll=true
)To search for specific information across projects:
// Search in one project:
mcp_cursor-cortex_read_tacit_knowledge(
projectName="project-name",
searchTerm="your search term"
)
// Repeat for each relevant projectTo list all tacit knowledge documents in a specific project:
mcp_cursor-cortex_read_tacit_knowledge(
projectName="project-name",
documentName="list"
)To read branch notes for a project:
mcp_cursor-cortex_read_branch_notes(
branchName="branch-name", // e.g., "main"
projectName="project-name"
)Default is the full file, including COMMIT separators. Use mode="uncommitted" (or uncommittedOnly=true) for work since the last commit. Date and commitHash filters still work on this same tool:
mcp_cursor-cortex_read_branch_notes(
branchName="branch-name",
projectName="project-name",
mode="uncommitted"
)
mcp_cursor-cortex_read_branch_notes(
branchName="branch-name",
projectName="project-name",
afterDate="2025-09-01",
beforeDate="2025-10-01"
)To understand a project's purpose and goals:
mcp_cursor-cortex_read_context_file(
branchName="branch-name", // e.g., "main"
projectName="project-name"
)After making changes to code:
mcp_cursor-cortex_update_branch_note(
branchName="branch-name",
projectName="project-name",
message="Detailed description of changes made"
)After commits, add a separator automatically with Git hooks or manually:
mcp_cursor-cortex_add_commit_separator(
branchName="branch-name",
projectName="project-name",
commitHash="hash-of-commit",
commitMessage="commit message"
)To document important insights:
mcp_cursor-cortex_create_tacit_knowledge(
title="Descriptive Title",
author="Author Name",
projectName="project-name",
problemStatement="Description of the problem",
approach="How the problem was solved",
outcome="Results achieved"
)To set up automatic commit separators in a project:
-
Create a
hooksdirectory with apost-commitscript:#!/bin/bash BRANCH_NAME=$(git branch --show-current) COMMIT_HASH=$(git rev-parse HEAD) COMMIT_MESSAGE=$(git log -1 --pretty=%B) PROJECT_NAME=${CURSOR_CORTEX_PROJECT:-$(basename $(git rev-parse --show-toplevel))} cursor-cortex add_commit_separator --branchName="$BRANCH_NAME" --projectName="$PROJECT_NAME" --commitHash="$COMMIT_HASH" --commitMessage="$COMMIT_MESSAGE"
-
Install the hook with a setup script:
#!/usr/bin/env node import fs from 'fs/promises'; import path from 'path'; import { execSync } from 'child_process'; async function setupHooks() { const gitRoot = execSync('git rev-parse --show-toplevel').toString().trim(); const hooksDir = path.join(gitRoot, '.git', 'hooks'); try { await fs.access(hooksDir); } catch (error) { await fs.mkdir(hooksDir, { recursive: true }); } const sourcePostCommitHook = path.join(gitRoot, 'hooks', 'post-commit'); const targetPostCommitHook = path.join(hooksDir, 'post-commit'); await fs.copyFile(sourcePostCommitHook, targetPostCommitHook); await fs.chmod(targetPostCommitHook, 0o755); }
setupHooks();
## Semantic Search Setup
### Generating Embeddings
For AI-powered semantic search capabilities, embeddings must be generated for all knowledge files:
```javascript
// Generate embeddings for the first time or for new content
mcp_cursor-cortex_generate_embeddings(
forceRegenerate=false,
verbose=true
)
// Force regenerate all embeddings (after content updates)
mcp_cursor-cortex_generate_embeddings(
forceRegenerate=true,
verbose=true
)
When to Generate Embeddings:
- After initial installation (first time setup)
- After creating multiple new tacit knowledge documents
- After major branch note updates
- If semantic search returns fewer results than expected
Performance:
- Initial generation: Duration varies by document count and system (expect minutes for hundreds of documents)
- Incremental updates: Very fast (only processes new files)
- Force regeneration: Faster with native TensorFlow backend if available
Storage Location:
- Embeddings stored in
~/.cursor-cortex/embeddings/ - Organized by type:
tacit_knowledge/,branch_notes_*/,context_*/
- Always Update Branch Notes: Document all changes in branch notes before committing
- Create Tacit Knowledge: Document solutions to complex problems and important insights
- Search Before Creating: Check if knowledge already exists before creating new documents
- Use Context Files: Maintain updated context files for each project branch
- Organize by Tags: Use consistent tags when creating tacit knowledge documents
- Cross-Project Search Not Working: Search each project separately
- Commit Separators Not Added: Ensure Git hooks are properly installed
- Missing Projects: Confirm correct project name spelling
// First list all projects
const projects = ["cursor-cortex", "clip-databricks-dashboards", "another-project"];
// Search for knowledge about "commit separators" in each project
for (const project of projects) {
mcp_cursor-cortex_read_tacit_knowledge(
projectName=project,
searchTerm="commit separator"
);
}// After making code changes
mcp_cursor-cortex_update_branch_note(
branchName="feature-branch",
projectName="my-project",
message="Implemented new feature X with improved error handling and tests"
);
// When ready to commit
mcp_cursor-cortex_generate_commit_message(
branchName="feature-branch",
projectName="my-project"
);