Skip to main content
Glama
dpdanpittman

mcp-server-quint

by dpdanpittman

quint_run

Simulate Quint specifications with random execution to verify invariants and detect violations through counterexample traces.

Instructions

Simulate a Quint specification with random execution. Runs the state machine and optionally checks an invariant. Returns pass/fail and a counterexample trace if the invariant is violated.

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")
invariantNoInvariant to check during simulation
max_samplesNoNumber of simulation runs (default: 10000)
max_stepsNoMax steps per run (default: 20)
seedNoRandom seed for reproducibility

Implementation Reference

  • Tool definition and handler for 'quint_run'. It uses 'runWithSource' to invoke the 'quint run' command with the provided simulation arguments (init, step, invariant, max_samples, max_steps, seed).
    server.tool(
      "quint_run",
      "Simulate a Quint specification with random execution. Runs the state machine and optionally checks an invariant. Returns pass/fail and a counterexample trace if the invariant is violated.",
      {
        ...sourceSchema,
        init: z.string().optional().describe('Init action name (default: "init")'),
        step: z.string().optional().describe('Step action name (default: "step")'),
        invariant: z
          .string()
          .optional()
          .describe("Invariant to check during simulation"),
        max_samples: z
          .number()
          .optional()
          .describe("Number of simulation runs (default: 10000)"),
        max_steps: z
          .number()
          .optional()
          .describe("Max steps per run (default: 20)"),
        seed: z.number().optional().describe("Random seed for reproducibility"),
      },
      async ({
        source,
        file_path,
        init,
        step,
        invariant,
        max_samples,
        max_steps,
        seed,
      }) => {
        try {
          const result = await runWithSource(source, file_path, (f) => {
            const args = ["run"];
            if (init) args.push(`--init=${init}`);
            if (step) args.push(`--step=${step}`);
            if (invariant) args.push(`--invariant=${invariant}`);
            if (max_samples != null) args.push(`--max-samples=${max_samples}`);
            if (max_steps != null) args.push(`--max-steps=${max_steps}`);
            if (seed != null) args.push(`--seed=${seed}`);
            args.push(f);
            return args;
          });
          return formatResult(result);
        } catch (err) {
          return {
            content: [{ type: "text", text: `Error: ${err.message}` }],
            isError: true,
          };
        }
      },
    );
Behavior2/5

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

With no annotations provided, the description carries full burden but only partially discloses behavior. It mentions random execution, pass/fail outcomes, and counterexample traces, but lacks critical details like execution environment requirements, potential side effects, performance characteristics, error handling, or what happens when no invariant is provided. The behavioral description is incomplete for a simulation tool.

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 concise with two sentences that each earn their place. The first sentence establishes the core simulation purpose, the second explains the invariant checking capability and return values. No wasted words, well-structured, and front-loaded with the main functionality.

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

Completeness3/5

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

For a simulation tool with 8 parameters, no annotations, and no output schema, the description is moderately complete. It covers the basic purpose and return values but lacks sufficient behavioral context about execution environment, error conditions, performance limits, and how it differs from sibling tools. The absence of output schema means the description should ideally explain return format more thoroughly.

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 fully documents all 8 parameters. The description adds minimal value beyond the schema - it mentions 'optionally checks an invariant' which corresponds to the 'invariant' parameter, but provides no additional semantic context about parameter interactions, precedence rules, or usage patterns. 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 specific action ('simulate a Quint specification with random execution'), the resource ('Quint specification'), and distinguishes from siblings by focusing on simulation rather than documentation, parsing, testing, type checking, or verification. It precisely communicates the tool's function in one sentence.

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

Usage Guidelines3/5

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

The description implies usage for simulation and invariant checking in Quint specifications, but provides no explicit guidance on when to use this tool versus alternatives like quint_test or quint_verify. It mentions optional invariant checking but doesn't clarify scenarios where this is preferred over other testing/verification tools.

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