Why context belongs next to your data
Your data is already in the Catalog, and context documents reference it directly through annotations. That turns scattered business knowledge into a structured map of how your definitions connect to real tables, fields, and pipelines, instead of a document set that describes data living somewhere else. Centralizing that layer also means everyone reaching your data through Nekt works from the same definitions, whatever tool they use: Claude, Codex, Copilot, or any other agent. Same source, same rules, same answers. That consistency is what makes agent responses faster, more accurate, and repeatable across a team.What’s in a context document
Each document combines two things:- Prose that describes a metric, segment, rule, or definition in plain language.
- Annotations that link the prose to specific resources in your workspace, so the AI knows exactly which tables, fields, and pipelines the definition refers to.
When an agent retrieves a document, the annotations bring in the resolved resource names, layers, and descriptions automatically — so the model gets both the business definition and the underlying schema in one place.
Creating a context document
Open Context from the sidebar. You’ll see two views:- All documents — every context document in your workspace.
- Templates — starter prompts that help your agent draft your first documents.
1
Start from a template or blank
Pick a template that matches what you want to document, or click New document to start from scratch. If you don’t know where to begin, the Don’t know where to start? template lets your agent explore your workspace and propose what to document first.
2
Write the definition in prose
Explain the concept the way you would to a new analyst. Focus on intent — what counts, what doesn’t, why — rather than how the SQL should be written.
3
Add annotations
Reference the tables, fields, layers, queries, notebooks, sources, or destinations the definition depends on. Annotations keep the document anchored to real resources as your warehouse evolves.
4
Save
The document is indexed immediately. The next agent question that touches that topic will use it.
Let an agent build your library
If you already have this knowledge written down somewhere, the fastest path is to hand it to an agent connected to your workspace through the MCP Server.1
Gather what you already have
Metric definitions, onboarding docs, wiki exports, spreadsheets of business rules. Anything that explains how your business works.
2
Share the files in an agent session
Attach them to a conversation with Claude, Codex, or any other assistant connected to your Nekt MCP Server.
3
Ask it to structure them as context documents
The agent writes each document in the right format and adds annotations pointing at the tables and fields that already exist in your Catalog, so the result is shaped for agent consumption from the start.
4
Review before saving
You still own the definitions. Read what the agent produced, correct anything that drifted, and drop documents that don’t earn their place.
Templates
Nekt ships with starter prompts that cover the definitions most teams need first:Revenue & MRR
How revenue is recognized and MRR is calculated, including multi-currency handling.
Active customers definition
Which subscription statuses count as paying, and the internal orgs that never do.
Sales funnel stage definitions
What counts as an MQL, SAL, and SQL, and which lead sources are excluded.
Product usage & credits
How customers consume the product, unit conversions, and plan-limit signals.
Cross-cutting rules
The gotchas that apply to every analysis: exclusions, soft deletes, currencies.
Don't know where to start?
Let your agent explore your workspace and propose what to document first.
How agents use Context
When you ask a question through the MCP Server or any other AI integration, Nekt runs a semantic search over your context documents and feeds the most relevant ones into the SQL generation step. The agent reads the business rules first, then writes a query that respects them. This means the same question — “What was revenue last month?” — produces different SQL for different organizations, because each organization’s definition of revenue lives in its own context library.Best practices
Prefer prose plus annotations over raw SQL. Describe what a metric means, not how to compute it. Schemas change; definitions don’t.
Programmatic access
AI agents can also create, update, and delete context documents through the MCP Server. Seecreate_context_document, update_context_document, and delete_context_document for the full schemas.