-
Notifications
You must be signed in to change notification settings - Fork 12
Add prompt loader and root server prompt #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main-archive
Are you sure you want to change the base?
Conversation
|
c00af81 to
86834fe
Compare
|
@JReinhold @shilman I am not locked into the current prompt, but it does work as-intended. I just took a first-pass loosely-modeled after what I've seen Notion use. Their MCP server has worked well for me. Looking forward to hearing your thoughts! |
shilman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!! I'll let @JReinhold test but the change makes sense and LGTM. However, we'd also want to update the README as part of this change too, right?
|
Ohhhh yeah good call! I'll push up the change 👍 |
|
Just some added context! I was having trouble getting the MCP server to be used automatically, but I think Claude is just acting a little strange. It wasn't using the tool automatically, but now that I've made a few stories, it seems to have picked up that I want to use the tool. That being said, I do think this prompt change will be helpful! Been using the MCP server to add a bunch of stories to my blog site this weekend and it's been going well! |
JReinhold
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this is really interesting, thank you! I didn't know MCP servers supported root instructions like this, is there any way I can read up on this? I can't really find documentation about this anywhere. Is this supported by all clients?
|
@JReinhold sorry for the delay here! I haven't been able to poke at MCP stuff as much as I would have liked to recently, but as far as I know, that The documentation also doesn't really mention what the |
|
I've been testing this out lately with the update to Sonnet 4.5 and have been seeing some issues where it's not applying the prompt anymore. When I ask it why didn't use the server, it gives me the usual "You're absolutely right!" junk. But it goes on to say that it jumped right into evaluating the code, which seems to somehow be making it opt to not use the server unless explicitly asked. Doing some testing to see if I can tweak the prompt! I have switched it to using Markdown locally, but I don't think that's the issue here - there have been some updates to the models I've been using, so I suspect it's related. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something weird happened when resolving the file conflicts earlier - I will update this! Just need to make sure we don't include docs on modifying their AGENT.md and/or their CLAUDE.md files since it should no longer be required. Need to step out for some errands, but will get to this later!
|
@JReinhold @shilman sorry for the slow updates here; been dealing with some stuff on my personal time that's been making it a bit difficult to dabble as much as I'd like. I'll get this PR updated soon, but I still think we should find a valid root server prompt here. However, I am not quite sure of the exact "intent" we want to aim for here. Right now, the root prompt I have both works, but will also burn users' context unnecessarily (it forces the client to review the description of every tool). Ideally, we should have a prompt that informs the client of every tool it offers at a very minimal level. I had something similar before, but found that the prompt wasn't causing the server to be used. Here is the current "brute force" prompt: I am open to suggestions on how I might tweak this to be proactive, but also not too aggressive. Let me know what y'all think! |
This is confusing to me, because the description of all tools is always part of the agent's context, so wouldn't that be enough to satisfy that need? btw the MCP site now has an "instructions" column which shows which clients support these root-level instructions. Not many, but at least Claude Code and Copilot. https://modelcontextprotocol.io/clients#feature-support-matrix |
|
@JReinhold I can only really speak from an experimental perspective, but may need to go back through a series of tests here since there have been some updates to things. What I can say is that, without the root server prompt, the tools' descriptions were not enough to have my client actually use them. I'd have to either directly-instruct the client to use the It looks to me like a user's client won't even read the tool descriptions unless the root MCP server prompt indicates the server can handle the request. However, the resource you've linked wasn't around when I was poking at this (as far as I recall). If other clients don't need this, then I'd think this is still an improvement, but much more limited in scope - real bummer, tbh 🙁 I can say for sure that Claude Code will not use this MCP server unless I tell it to (or, if the server has this root instruction), which was what I was aiming to fix here. |
This PR aims to:
Testing
pnpm run storybookget_ui_building_instructionstoolScreenshot:

Additional Context
This prompt setup is modeled after the setup I used in a side project MCP server I've been working on here:
Through testing, I can confirm that the prompt added like this does in fact make the MCP server be used very proactively. It was actually a bit too strong at first and would get used for things it wasn't exactly intended for.
Why is the prompt so long?
I modeled the prompt loosely after Notion's MCP server tools which are very specific and quite lengthy. That being said, it seems this approach is generally better since it removes most of the need for the user to have lengthy back-and-forths with the tool to get a usable response.
Going further
Each
descriptionfield on the tools should probably have a similarly-specific prompt, but I wanted to start with a baseline that we can iterate on first. Let me know what you think!