Svelte MCP Resource References
I just discovered that you can use @ resource references in Claude CLI to inject Svelte docs directly into context.
Assuming you are using the Svelte MCP the model has to call list-sections and get-documentation via the MCP to fetch the docs it needs and inject it into the context. The model can then search within the documentation to find what it needs given the context of your prompt.
For example, if your prompt was to say create a component that uses $state to manage a counter, then the model has to fetch list-sections, determine what is available then fetch the relevant documentation.
Nothing wrong with this, it is what it is for. However, assuming you are aware of this and you have some experience with Svelte, then you can instead inject the resource reference directly into the context that would save some time and some tokens as the model will only fetch what you have specified.
So an example prompt might be as follows where I know I need state documentation so I can add it to the context directly. In Claude CLI type @svelte to get a list of all the available resources.
@svelte:svelte://svelte/$state.md create a component that uses $state to manage a counter This is really something I think is useful to know rather than something that has huge gains in terms of time and token cost, who knows? Not me!
Examples
You can type @svelte in the CLI to browse and filter all available resources. A few examples:
@svelte:svelte://svelte/$state.md
@svelte:svelte://svelte/$derived.md
@svelte:svelte://svelte/$effect.md
@svelte:svelte://svelte/$props.md
@svelte:svelte://svelte/stores.md
@svelte:svelte://svelte/transition.md
@svelte:svelte://svelte/context.md
@svelte:svelte://kit/routing.md
@svelte:svelte://kit/load.md
@svelte:svelte://kit/form-actions.md
@svelte:svelte://kit/hooks.md
@svelte:svelte://kit/auth.md