feat(mcp): add options to fetch only sections of docs to save tokens
โ Type of change
- [x] ๐ Documentation (updates to the documentation or readme)
- [ ] ๐ Bug fix (a non-breaking change that fixes an issue)
- [x] ๐ Enhancement (improving an existing functionality)
- [x] โจ New feature (a non-breaking change that adds functionality)
- [ ] ๐งน Chore (updates to the build process or auxiliary tools and libraries)
- [ ] โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
Added additional tools to MCP, so it can retrieve only sections for components, like, theme, or slots.
list_component_sections- lists available sections for a componentget_component_sections- fetches only specified sections- Enhanced
get_componentwith optionalsectionsparameter
I'm in a middle of a large migration and tried to connect MCP server to help me out with it, but it fetches whole docs for components, when it actually needs to learn the new slot names, or how themes structure has changed for specific components. For example, fetching table docs alone throws warnings about token count.
Claude says it could save him 70-90% of tokens. :sweat_smile:
๐ Checklist
- [ ] I have linked an issue or discussion.
- [x] I have updated the documentation accordingly.
@BerzinsU I totally agree that some components are extremely long and probably overload the context of some models. However, I don't think the solution is to add more tools, but rather to modify and improve the existing ones. I'll try to investigate this!