Tools

MCP tools reference for OpenContext.

save_context

Saves markdown content to .opencontext/<topic>.md. Existing files are overwritten.

Arguments

NameTypeRequiredDescription
topicstringyesLowercase snake_case or kebab-case topic name
contentstringyesMarkdown 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

NameTypeRequiredDescription
topicstringnoTopic 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

NameTypeRequiredDescription
topicstringyesLowercase snake_case or kebab-case topic name to delete

Behaviors

  • Respects readOnly and disabled config modes.
  • Removes .opencontext/<topic>.md from disk.
  • Triggers index rebuild if autoIndex is true.
  • Throws INVALID_TOPIC for malformed topic names.
  • Throws NOT_FOUND if 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 .opencontext

Or ignore it when context should stay local:

.gitignore
.opencontext/