Tools
MCP tools reference for OpenContext.
save_context
Saves markdown content to .opencontext/<topic>.md. Existing files are overwritten.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| topic | string | yes | Lowercase snake_case or kebab-case topic name |
| content | string | yes | Markdown content to save |
Example
user input
Save our API conventions under topic api-contracts.read_context
Reads one saved topic, or lists all topics when no topic is provided.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| topic | string | no | Topic to read. Omit to list all saved topics. |
Example
user input
Read the architecture context before changing the routing layer.delete_context
Deletes a saved topic file from disk. Automatically rebuilds the index when autoIndex is enabled.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| topic | string | yes | Lowercase snake_case or kebab-case topic name to delete |
Behaviors
- Respects
readOnlyanddisabledconfig modes. - Removes
.opencontext/<topic>.mdfrom disk. - Triggers index rebuild if
autoIndexis true. - Throws
INVALID_TOPICfor malformed topic names. - Throws
NOT_FOUNDif the topic does not exist.
Example
user input
Remove the deprecated auth-legacy topic since we migrated to the new auth flow.Version Control
You can commit .opencontext/ when it contains team-wide knowledge:
terminal
git add .opencontextOr ignore it when context should stay local:
.gitignore
.opencontext/