Cortex
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| sessionC | USE WHEN: Session lifecycle (orientation, registry, compaction). EXAMPLES: session(operation="start", goal="Fix auth bug"); session(operation="compact", summary="Session handoff"). |
| planB | Plan lifecycle: create, list, get, complete, register, graph, or archive_completed. USE WHEN: managing plan files, marking plans complete, registering roadmap entries, or reading the plan dependency graph (operation="graph"). EXAMPLES: plan(operation="create", ...), plan(operation="graph"), plan(operation="register", ...). |
| update_memory_bankA | Add/remove roadmap entries and append memory-bank entries. USE WHEN: You need a single memory-bank mutation entrypoint for roadmap edits (add/remove section entries) or append-style updates for progress, active context, or operations log entries. DO NOT use this tool for free-form markdown rewrites; Prefer targeted operation modes so validation and sync rules remain enforceable. EXAMPLES:
|
| run_quality_gateA | Run Phase A quality gate end-to-end and return full result. Zero args required. USE WHEN: Running the commit pipeline Phase A quality gate or the Step 12 final gate. Spawns checks as a detached subprocess and polls with heartbeat progress notifications, keeping the MCP stdio connection alive. Config is read from the pipeline session file written by pipeline_handoff(operation="write", pipeline="commit", phase="checks"). Supported keys: coverage_threshold (float), test_timeout (int), force_fresh (bool), reflection (bool), force_reflection (bool). When reflection is enabled and primary checks pass, a heuristic reflection pass runs; error-level findings set preflight_passed to false. EXAMPLES:
|
| run_docs_gateA | Run Phase B docs/memory-bank sync validation. Zero args required. USE WHEN: Validating that timestamps, roadmap_sync, and memory-bank files are consistent after documentation updates. Called by the commit-docs subagent as a zero-arg alternative to execute_pre_commit_checks(phase="B") (which Cursor's MCP bridge zero-args to Phase A, running tests instead). RETURNS: JSON with docs_phase_passed (bool), timestamps_result, and roadmap_sync_result. Does NOT run tests or code quality checks. EXAMPLES:
|
| autofixA | Auto-fix formatting, linting, type errors, and markdown lint. Zero args required. USE WHEN: Phase A fails and automated fixes are needed before re-running checks. Called by commit-checks, commit-final-gate, and implement-code agents after preflight_passed=false. Runs fix_errors, format, type_check, and markdown auto-fix. INTEGRITY SAFEGUARDS:
EXAMPLES:
|
| compress_memory_bankA | Compress project memory files (CLAUDE.md, .cortex/memory-bank/*.md) to reduce session token cost. Creates .original backups; validates structural integrity before overwriting. Returns per-file compression ratios. USE WHEN: Attached projects need shorter CLAUDE.md / memory-bank prose after cortex://analysis flags compression candidates, or before long sessions. DO NOT: Run on source code, tests, or user-facing docs outside memory paths. EXAMPLES:
RETURNS: JSON with |
| memory_walA | Inspect or manage the memory-bank WAL (JSONL audit log and snapshots). USE WHEN: You need an audit trail of memory-bank writes, anomaly hints, or
a filesystem snapshot/restore of DO NOT: Treat WAL as authoritative security auditing; it is best-effort and can be disabled by disk errors (writes still proceed). EXAMPLES:
Pre-compact automation: there is no bundled Claude |
| pipeline_handoffA | Structured inter-agent communication for pipeline workflows. USE WHEN: Orchestrators need to exchange structured data between pipeline phases. Each phase writes its output; the next phase reads it. All data persists in .cortex/.session/{id}/{pipeline}/. WORKFLOW (simplified):
EXAMPLES:
Legacy aliases (write_task, read_task, write_result, read_state) still work. RETURNS: JSON with {status, ...} for write ops; JSON file content for reads. Args:
operation: init | write | read | read_log | status | mark_running
| clear | snapshot | rollback
(legacy: write_task, read_task,
write_result, read_state)
pipeline: Pipeline name (e.g. "commit", "implement"). Default: "default".
phase: Phase name (e.g. "preflight", "checks"). Required for write.
For read: if given, reads that phase; if omitted, reads full state.
data: Payload for write and init. Accepts JSON string or native object.
When the JSON includes free-text fields such as |
| thinkA | Append a thought to internal scratchpad. USE WHEN: Agent needs reasoning before action or multi-step deliberation. EXAMPLES: think(thought="Check constraints"), think(thought="Step 1", thought_number=1, total_thoughts=2, next_thought_needed=True). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| setup_synapse | Setup Synapse via Git submodule (always available). Args: synapse_repo_url: URL of Synapse repository (default provided) |
| setup_codegraph | Add CodeGraph semantic code intelligence to this project. Adds CodeGraph MCP server to .cursor/mcp.json, runs codegraph init, and wires permissions for Claude Code. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| get_structure_info | Resource: Project structure info. Zero-arg with caching. |
| health_check | Check MCP connection health and resource utilization. USE WHEN: User wants connection status, user needs health check, user requests connection health, user wants to monitor MCP server. EXAMPLES: 'check MCP connection health', 'get connection status', 'check server health', 'monitor MCP connection'. DO NOT: - Call this tool in tight loops or as part of every agent turn; it is a diagnostics helper, not a heartbeat. - Treat this as a generic HTTP or infrastructure health check; it reports only on the MCP server connection. RETURNS: JSON with connection status, resource metrics, and health indicators. Args: None. No parameters required. Returns connection health metrics including: - Connection status (healthy/unhealthy) - Current concurrent operations - Maximum allowed concurrent operations - Resource utilization percentage - Available semaphore slots Returns: JSON string with health metrics: { "status": OperationStatus.SUCCESS.value, "health": { "healthy": true, "concurrent_operations": 2, "max_concurrent": 5, "semaphore_available": 3, "utilization_percent": 40.0 } } Example (success): health_check() → {"status": OperationStatus.SUCCESS.value, "health": {"healthy": true, "concurrent_operations": 1, "max_concurrent": 5, "semaphore_available": 4, "utilization_percent": 20.0}} Example (error): health_check() (when MCP disconnected or check fails) → {"status": OperationStatus.ERROR.value, "error": "Connection closed", "error_type": "ConnectionError"} |
| get_relevant_rules | Resource: Rules relevant to current task. Zero-arg — reads task from session config. Falls back to "general coding standards" if no session config exists. |
| analyze | Resource: Run analysis. Zero-arg — reads target from session config. Falls back to "context" if no session config exists. Target must be one of: usage_patterns, structure, insights, context. |
| validate | Resource: Run validation. Zero-arg — reads check_type from session config. Falls back to "timestamps" if no session config exists. check_type must be one of: schema, duplications, quality, infrastructure, timestamps, roadmap_sync. |
| load_context |
TDQS
Scored across 10 tools
Each tool addresses a unique aspect of the development workflow: autofix handles fixes, compress and memory_wal manage memory, pipeline_handoff and session handle orchestration, plan and update_memory_bank manage planning and memory mutations, run_* gates run checks, and think provides reasoning. No two tools have overlapping purposes.
Names mix verb_noun (run_docs_gate, update_memory_bank, compress_memory_bank) with noun phrases (memory_wal, pipeline_handoff) and bare verbs (autofix, think). The pattern is inconsistent, though all use lowercase and underscores.
10 tools is a well-scoped set for the domain: code quality, memory management, pipeline handoff, planning, sessions, and cognition. No tool seems redundant or missing.
The tool set covers the full lifecycle of code quality checks, memory operations, pipeline communication, planning, and session management. Minor gaps exist (e.g., no tool to inspect raw quality gate output without re-running), but core workflows are well-supported.