Skip to main content
Glama

how-to-use

Learn to use Vite's Hot Module Replacement and checkpoint features for real-time code updates during development with the Vite MCP Server.

Instructions

Description of how to use the server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectionYesSection to describe

Implementation Reference

  • The execution logic for the 'how-to-use' tool, returning markdown content with instructions based on the provided section.
    }, ({ section }) => { switch (section) { case 'checkpoint': return { content: [ { type: 'text', text: ` You can use checkpoint features by inserting '<meta name="__mcp_checkpoint" data-id="">' into the head to create a named snapshot of the current state. The data-id attribute is a unique identifier for the checkpoint. Console logs generated in the browser while a checkpoint is active are tagged with the checkpoint ID and can be queried individually. Note: Since hot reload is triggered when files are saved, carefully consider the sequence between meta tag changes and the changes you want to observe. Make sure to set the checkpoint meta tag before making the changes you want to track.` } ] }; case 'hmr': return { content: [ { type: 'text', text: ` If the HMR connection is established with the client, the server will automatically gather HMR events and provide them to the client. You can read the HMR events using the 'get-hmr-events' tool. The HMR connection is optional. If your development environment does not support HMR, you cannot read HMR events, but you can still check the results of file modifications by using 'execute-browser-commands' to refresh the page.` } ] }; default: return { content: [ { type: 'text', text: 'Invalid section' } ] }; } });
  • The input schema definition for the 'how-to-use' tool, specifying the 'section' parameter.
    server.tool('how-to-use', 'Description of how to use the server', { section: z.enum(['checkpoint', 'hmr']).describe('Section to describe'), }, ({ section }) => {
  • src/index.ts:41-41 (registration)
    The registration of the 'how-to-use' tool on the MCP server instance.
    server.tool('how-to-use', 'Description of how to use the server', {

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ESnark/blowback'

If you have feedback or need assistance with the MCP directory API, please join our Discord server