Skip to main content
Glama

how-to-use

Learn to configure and interact with the Vite Dev server's Hot Module Replacement and checkpoint sections using this tool. Optimize real-time code updates and AI-driven modifications.

Instructions

Description of how to use the server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectionYesSection to describe

Implementation Reference

  • The handler function for the 'how-to-use' tool. It takes a 'section' parameter ('checkpoint' or 'hmr') and returns structured content with usage instructions for that 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' } ] }; } });
  • Input schema for the 'how-to-use' tool using Zod: defines 'section' as an enum of 'checkpoint' or 'hmr'.
    section: z.enum(['checkpoint', 'hmr']).describe('Section to describe'),
  • src/index.ts:41-41 (registration)
    Registration of the 'how-to-use' tool on the server using server.tool(name, description, schema, handler).
    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