Title: Add support System Message injection by the MCP Servers for instruction injection and state exposure. · Issue #148 · modelcontextprotocol/modelcontextprotocol · GitHub
Open Graph Title: Add support System Message injection by the MCP Servers for instruction injection and state exposure. · Issue #148 · modelcontextprotocol/modelcontextprotocol
X Title: Add support System Message injection by the MCP Servers for instruction injection and state exposure. · Issue #148 · modelcontextprotocol/modelcontextprotocol
Description: Problem Statement: Sometimes tools do not give enough context to the Agent about how to best use the MCP server as they need general understanding of what this tools are used for together, such as a Toolkit of sorts. There may also be ca...
Open Graph Description: Problem Statement: Sometimes tools do not give enough context to the Agent about how to best use the MCP server as they need general understanding of what this tools are used for together, such as ...
X Description: Problem Statement: Sometimes tools do not give enough context to the Agent about how to best use the MCP server as they need general understanding of what this tools are used for together, such as ...
Opengraph URL: https://github.com/modelcontextprotocol/modelcontextprotocol/issues/148
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support System Message injection by the MCP Servers for instruction injection and state exposure.","articleBody":"### Problem Statement:\nSometimes tools do not give enough context to the Agent about how to best use the MCP server as they need general understanding of what this tools are used for together, such as a Toolkit of sorts. There may also be cases where servers are `stateful` and may want to provide the LLM with context that may help decide when and how to best use the tools.\n\nExamples:\n\n- State of the entity the MCP server is controlling: Something is ON/OFF, a list of active resources.\n- Toolkit instructions: An instruction that tells the LLM which tools belong together and how to best use them as a whole.\n\n\n### Proposed Solution:\nThe proposed solution is to allow the MCP Client to request a server for a System prompt (or multiple), this request may be done for each interaction with the LLM so the System Message is always aligned with the state of the server in case stateful context needs to be shared with the Agent.\n\nThe prompts returned by the server can then be used and merged with the agent's main system prompt.\n\n### Alternatives:\nAn addition to the above or an alternative as a whole is to allow an server to attach as snippet of a user message prompt into the user message the agent is generating. This snippet would contain stateful information about the MCP server which might be relevant to the agent and informs it about the current state. One benefit of this approach is that the snippet of the user message provided by the server would likely be persisted by the agent in the conversation history, thus letting the LLM reason about how the state of the server has been changing.\n\n\n\nExample Request to a Home Automation:\n```json\n{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"instructions/get\"\n}\n```\nExample Response:\n```json\n{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"result\": {\n \"contents\": [\n {\n \"content\": {\n \"type\": \"text\",\n \"text\": \"Your have the ability to do home automation with the following tools...\"\n }\n },\n {\n \"content\": {\n \"type\": \"text\",\n \"text\": \"You can control the following home devices using the home automation tools $(LIST OF HOME DEVICES AND OTHER INFORMATION)\"\n }\n }\n ]\n }\n}\n```\n","author":{"url":"https://github.com/Altaflux","@type":"Person","name":"Altaflux"},"datePublished":"2025-01-20T19:15:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":16},"url":"https://github.com/148/modelcontextprotocol/issues/148"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1e8f67d6-eacd-4a2a-5016-7739581d6a72 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA48:11D574:556ACC:71431B:6A5B583D |
| html-safe-nonce | a0a2a05439e89b2468fa76fae6f29c64958495d7b307663ae9f5e537c212acd4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTQ4OjExRDU3NDo1NTZBQ0M6NzE0MzFCOjZBNUI1ODNEIiwidmlzaXRvcl9pZCI6IjQwMDE3OTM1MzM0MTM1MTk5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b542200c760e687ffd24ecd9344d442995489e06f781323c27f249279653324a |
| hovercard-subject-tag | issue:2800133968 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/modelcontextprotocol/148/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fe2f6860fc63a891655ebcb50b32b5772f520547f4ef2515cba22f28ad12e216/modelcontextprotocol/modelcontextprotocol/issues/148 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fe2f6860fc63a891655ebcb50b32b5772f520547f4ef2515cba22f28ad12e216/modelcontextprotocol/modelcontextprotocol/issues/148 |
| og:image:alt | Problem Statement: Sometimes tools do not give enough context to the Agent about how to best use the MCP server as they need general understanding of what this tools are used for together, such as ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Altaflux |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/modelcontextprotocol git https://github.com/modelcontextprotocol/modelcontextprotocol.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862570523 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/modelcontextprotocol |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862570523 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/modelcontextprotocol |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width