Skip to content

Context engineering

Context engineering is the practice of structuring and managing AI context to make it reliable, reusable, and maintainable. The Model Context Protocol (MCP) provides an open standard for how tools fetch context from servers.

MCP is an open standard that defines how AI tools securely fetch context from servers. It separates context management from tool usage, enabling teams to maintain a single source of truth that works across different tools.

Prompts (/instructions)

  • Dynamic prompt templates that accept arguments
  • Use $arguments for user input
  • Use @references to pull in static knowledge
  • Must include metadata (name, description) for tool discovery

Resources (@knowledge)

  • Static reference material (API specs, schemas, guides)
  • Served as-is without dynamic properties
  • Referenced by prompts using @knowledgeFile syntax
  • Provide the “source truth” for AI accuracy

Libraries

  • Collections of prompts and resources
  • Organised by project, team, or purpose
  • Published as a unit to MCP endpoints
  • Accessible to any MCP-compatible tool

1. Separation of static and dynamic content

Section titled “1. Separation of static and dynamic content”

Static reference material (@knowledge) should be separate from dynamic prompts (/instructions). This allows you to update schemas or guides in one place without rewriting prompts.

Example: An API schema lives in @api-schema.md. Multiple /instructions reference it using @api-schema, so all prompts use the same up-to-date schema.

Use @references to make dependencies explicit. When a prompt references knowledge, that relationship is clear and validated before publishing.

Example: Generate a component using @Frontend-Style-Guide makes it explicit that this prompt depends on the style guide.

MCP implementations use a Draft/Published workflow. Drafts allow safe iteration while Published versions remain stable for your team.

  • Draft: Private, editable, not available to tools
  • Published: Stable, available to all connected tools, replaces previous Published version

This way you never break working prompts your team relies on.

MCP requires metadata for discovery and usability:

  • Descriptions: Human-readable explanations of what prompts do and what arguments mean
  • Argument types: Whether inputs are required or optional
  • Reference validation: All @references must resolve to existing resources

Without proper metadata, tools cannot present prompts effectively to users.

Context libraries centralise knowledge that would otherwise be scattered across files, wikis, and conversations. Update once and it propagates to all tools using that library.

Before MCP, teams had to build custom integrations for each tool, maintain context in multiple places, and manually sync updates across systems.

MCP changes that by providing one protocol that works across tools. Context is fetched on-demand from a central source and available everywhere.

Learn about /instructions, @knowledge, and libraries to start building context libraries.