Skip to main content
Glama
dpdanpittman

mcp-server-quint

by dpdanpittman

quint_verify

Verify invariants in Quint specifications through exhaustive model checking with Apalache. Checks all reachable states to validate system properties.

Instructions

Exhaustive model checking of a Quint spec via Apalache (requires Java 17+). Slower than simulation but checks ALL reachable states. Returns pass or a counterexample trace. Falls back gracefully if Apalache is not installed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNoQuint specification source code (.qnt content)
file_pathNoPath to a .qnt file on disk
initNoInit action name (default: "init")
stepNoStep action name (default: "step")
invariantYesInvariant to verify (required)
max_stepsNoMax steps for bounded model checking (default: 10)

Implementation Reference

  • The handler logic for the 'quint_verify' tool, which uses 'runWithSource' to execute the 'quint verify' command with the provided parameters.
    async ({ source, file_path, init, step, invariant, max_steps }) => {
      try {
        const result = await runWithSource(source, file_path, (f) => {
          const args = ["verify"];
          if (init) args.push(`--init=${init}`);
          if (step) args.push(`--step=${step}`);
          args.push(`--invariant=${invariant}`);
          if (max_steps != null) args.push(`--max-steps=${max_steps}`);
          args.push(f);
          return args;
        });
    
        // Add hint if Apalache is missing
        const output = [result.stdout, result.stderr]
          .filter(Boolean)
          .join("\n")
          .trim();
        if (
          result.exitCode !== 0 &&
          (output.includes("Apalache") ||
            output.includes("java") ||
            output.includes("JAVA_HOME"))
        ) {
          return {
            content: [
              {
                type: "text",
                text:
                  output +
                  "\n\nHint: quint verify requires Apalache (Java 17+). Install Java and Apalache, or use quint_run for simulation-based checking.",
              },
            ],
            isError: true,
          };
        }
    
        return formatResult(result);
  • index.js:261-273 (registration)
    The registration of the 'quint_verify' tool, including its schema definition.
    server.tool(
      "quint_verify",
      "Exhaustive model checking of a Quint spec via Apalache (requires Java 17+). Slower than simulation but checks ALL reachable states. Returns pass or a counterexample trace. Falls back gracefully if Apalache is not installed.",
      {
        ...sourceSchema,
        init: z.string().optional().describe('Init action name (default: "init")'),
        step: z.string().optional().describe('Step action name (default: "step")'),
        invariant: z.string().describe("Invariant to verify (required)"),
        max_steps: z
          .number()
          .optional()
          .describe("Max steps for bounded model checking (default: 10)"),
      },
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and does well. It discloses key behavioral traits: the tool 'requires Java 17+', is 'slower than simulation', 'returns pass or a counterexample trace', and 'falls back gracefully if Apalache is not installed'. This covers installation requirements, performance characteristics, output format, and error handling - valuable context beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly structured and concise - four sentences that each earn their place. It front-loads the core purpose, then explains key characteristics (speed vs. completeness), describes the output, and mentions installation requirements. Zero wasted words or redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex verification tool with 6 parameters and no output schema, the description provides good contextual completeness. It explains what the tool does, when to use it, performance characteristics, and installation requirements. The main gap is lack of information about return format details since there's no output schema, but the description at least mentions it returns 'pass or a counterexample trace'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 6 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema. It mentions the tool verifies invariants generally but doesn't provide additional context about parameter usage or relationships. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Exhaustive model checking of a Quint spec via Apalache' - specifying both the action (model checking) and resource (Quint spec). It distinguishes from siblings by mentioning it's 'slower than simulation but checks ALL reachable states', contrasting with quint_run (simulation) and other analysis tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context about when to use this tool: for exhaustive verification when you need to check ALL reachable states rather than just simulate. It mentions it's 'slower than simulation', implying quint_run is the alternative for faster but less thorough checking. However, it doesn't explicitly state when NOT to use it or compare with other siblings like quint_test.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/dpdanpittman/mcp-server-quint'

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