Skip to content

Overview

contox_create_context creates a new context in the project. You can optionally set initial content and place it within the context hierarchy by specifying a parent context ID.

This is useful for manually organizing project knowledge outside the automatic session save workflow.

Parameters

NameTypeRequiredDefaultDescription
namestringYesContext name
descriptionstringNoOptional description of the context
contentstringNoOptional initial content in markdown
parentContextIdstringNoOptional parent context ID to place this context in a hierarchy

Return value

Returns a confirmation message with the created context's name and ID:

Context created: My Custom Context (ctx_xyz789)

Usage examples

Creating a standalone context

User: Create a context for our API design decisions

Claude calls: contox_create_context({
  name: "API Design Notes",
  description: "Design decisions and patterns for the REST API",
  content: "## Pagination\nAll list endpoints use cursor-based pagination with `after` and `limit` parameters."
})

Creating a child context

Claude calls: contox_create_context({
  name: "Authentication Flow",
  description: "Detailed auth flow documentation",
  content: "## OAuth2 Flow\n...",
  parentContextId: "ctx_abc123"
})

Notes

  • The context is created first, then the content is set in a separate API call if provided.
  • The context is automatically associated with the current project and team.
  • For batch creation of structured contexts, consider using contox_populate instead.