The **Model Context Protocol (MCP)** is an important step toward standardizing how tools, resources, and prompts are exposed to large language models. It defines _what_ is available to a model and _how_ it can beccessed, without tightly coupling clients and servers. However, as MCP adoption grows, one limitation becomes increasingly visible: > MCP defines **capabilities**, but it does not define **contextual behavior**. In this post, I’ll briefly explain MCP, why this becomes problematic in real systems, and then introduce a concept I’m currently exploring: **(prompt) rules**. --- ## What MCP Is At its core, MCP is a protocol that allows a client (IDE, agent runtime, app, etc.) to interact with an MCP server that exposes: - **Tools** = (POST) callable actions (e.g. `search`, `query_db`, `deploy`) - **Resources** = (GET) retrievable data (documents, APIs, files) - **Prompts** = (GET) reusable prompt templates Prompts are especially interesting because they allow MCP servers to _suggest_ how models should be instructed. A prompt can bundle: - Instructions - Placeholders - Example usage - Output expectations In theory, this helps create reusable, composable, and shareable AI behavior. ## The Problem with Prompts Today In practice, prompts in MCP are **static** and **global**. Once a prompt is selected, the model receives a single block of instructions that has no real awareness of: - _Where information came from_ - _Which tool was used_ - _What kind of data is involved_ - _What constraints apply to specific sources_ This leads to several issues: ### 1. Missing Source-Specific Context If a model uses: - scraped internet data - internal intranet documents - confidential databases ...the prompt usually treats all of these equally unless the developer manually injects context. ### 2. Repetition and Boilerplate Developers often end up writing things like: > “If you use internet data, always mention it is unverified.” This logic is repeated: - across prompts - across tools - across agents And it’s easy to forget or apply inconsistently. ### 3. No Behavioral Hooks Sometimes context should not just _change the text_, but _change behavior_: - encryption requirements - logging restrictions - output filtering - escalation rules MCP currently has no structured way to express this. ## Introducing Rules To address this, I’m exploring the idea of **rules**. > Rules are metadata attached to tools or resources that influence how the final prompt is built or how the client behaves. Each MCP entity (tool, resource, agent) can carry its own set of rules. Conceptually: ```text Tool / Resource / Agent ├── description ├── schema └── rules ``` Rules come in different forms, depending on what you want to influence. ## Prompt Rules **Prompt rules** are rules that are rendered into the final prompt sent to the model. They are **dynamic**, **source-aware**, and **scoped**. ### Example: Source-Specific Prompt Rule A resource could define a prompt rule like: > “If you use this information, always hint to the user that it comes from the internet and is not validated.” This rule is not global, it belongs to that resource. ### Resulting Prompt Composition When multiple resources are used, the final prompt could look like this: ```text <Your main prompt here> ## Sources ### Internet 1. [Information](https://.../site/url/here) is about ... Rules: - If you use this information, always hint to the user that it comes from the internet and is not validated. ### Internal Knowledge Base 1. [Information](https://internal/site/url/here) is about ... Rules: - These information's are coming from the intranet and are safe to use. ``` The model now has: - Clear source boundaries - Explicit constraints - No ambiguity about trust level And most importantly: **The developer didn’t have to hard-code this logic into the prompt.** ## Why Prompt Rules Matter Prompt rules allow you to: - Attach **context directly to data** - Avoid global prompt pollution - Scale prompts across many tools/resources - Keep prompts declarative instead of procedural They also align well with MCP’s philosophy: > Servers describe capabilities; clients decide how to use them. In my opinion prompt rules should be set on each level. Meaning the whole MCP Server could have a prompt rule but also each type (tool/ resource) could have a shared prompt rule. Of course each action has also prompt rules. ## Beyond Prompts: Custom Rule Tags Prompt rules are powerful, but sometimes text alone is not enough. What if interacting with a tool should trigger **system-level behavior**? This is where **custom rule tags** come in. ## Custom Rule Tags Custom rule tags are **machine-readable rules** that are not rendered into the prompt. Instead, they are signals to the **client runtime**. Example: ``` 1. /tool/secure-query | rules=["encrypt_chat"] 2. /resource/public-docs | rules=[]` ``` Each rule tag is defined in documentation and interpreted by the client. ### Example: `encrypt_chat` Imagine a tool that: - accesses highly confidential data - returns regulated or sensitive output Today, enforcing encryption requires: - manual wiring - duplicated logic - out-of-band documentation With rule tags: - The tool declares: `rules=["encrypt_chat"]` - The client sees this rule - The client enforces encryption from that point forward No guessing. No hidden coupling. ## Why Rule Tags Are Powerful Rule tags enable: - Security enforcement - Compliance handling - Runtime behavior changes - Policy-driven agent design All without forcing MCP itself to define how these rules must work. ## Putting It All Together With rules, MCP entities gain **contextual intelligence**: - Prompt rules → guide the model - Rule tags → guide the system Instead of: - one giant prompt - brittle conventions - undocumented behavior We get: - composable context - explicit constraints - scalable agent design ## Closing Thoughts MCP already solves _discovery_ and capability exposure very well. What it currently lacks is a way to express: > “If you use this, here’s what it means.” Another idea is that rules are defined as numbers. There could be then default MCP rules from 1-1000 and everything above is custom rules which are retrieved from a bulk prompt endpoint in the MCP server. This also fixes the problem of duplication as duplicated rules don't need to be written twice. **Prompt rules and rule tags are a step toward that. But they come with their own problems:** - Prompt could get very long. - Rules could interfere with each other. - Server rule tags are hard to generalize if you are not building a MCP just for 1 reason. But if used wisely, I think this can improve overall Quality of the results. I will keep playing around with it. :=)