quint_docs
Access a curated cheat sheet for Quint syntax and built-in operators. Get quick reference documentation for sets, maps, lists, actions, temporal logic, types, modules, or testing.
Instructions
Quick reference for Quint syntax and built-in operators. Returns a curated cheat sheet for the requested topic. No CLI call needed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | Topic: "sets", "maps", "lists", "actions", "temporal", "types", "modules", "testing", or "all" for the full reference |
Implementation Reference
- index.js:365-413 (handler)The handler for the 'quint_docs' tool, which provides a cheat sheet for Quint syntax and operators based on the requested topic.
server.tool( "quint_docs", "Quick reference for Quint syntax and built-in operators. Returns a curated cheat sheet for the requested topic. No CLI call needed.", { topic: z .string() .describe( 'Topic: "sets", "maps", "lists", "actions", "temporal", "types", "modules", "testing", or "all" for the full reference', ), }, async ({ topic }) => { const topics = Object.keys(cheatsheet); if (topics.length === 0) { return { content: [ { type: "text", text: "Error: cheatsheet reference data not found. Reinstall the server.", }, ], isError: true, }; } const key = topic.toLowerCase().trim(); if (key === "all") { const sections = topics.map((t) => formatTopic(cheatsheet[t])); return { content: [{ type: "text", text: sections.join("\n\n") }] }; } if (cheatsheet[key]) { return { content: [{ type: "text", text: formatTopic(cheatsheet[key]) }], }; } return { content: [ { type: "text", text: `Unknown topic "${topic}". Available topics: ${topics.join(", ")}, all`, }, ], isError: true, }; }, ); - index.js:415-422 (helper)Helper function used to format the documentation entries into a readable string for the 'quint_docs' tool.
function formatTopic(section) { const lines = [`## ${section.title}`, section.description, ""]; for (const entry of section.entries) { lines.push(` ${entry.syntax}`); lines.push(` \u2192 ${entry.description}`); } return lines.join("\n"); }