Skip to main content
Glama
RocqSolid
by bn-peters

Rocq Check File

rocq_check_file

Check a Rocq file and report error diagnostics with source sentences and proof states. Use it to find proof errors and long-running sentences, with caching and graceful timeout handling.

Instructions

Check a Rocq file and report diagnostics.

Use this to check files for errors. (To find warnings, recompile the file manually.) Error diagnostics include the source sentence and the proof state at error positions.

The first error in a file is always reported, along with later errors reached within the after-error deadline. The list of errors may be truncated. The tool also reports Rocq sentences running for long time.

This tool is efficient due to per-file caching. For dune-based Rocq projects, it attempts to rebuild dependencies before checking and restarts the cached coq-lsp process when that applies. Use clear_cache = true when project files have changed or dependencies were rebuilt outside dune.

Timeouts are handled gracefully, and partial diagnostics are returned when possible. Repeated checks after timeouts use the cache.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file": "<file>"
    },
    "name": "rocq_check_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesAbsolute path to a .v file.
clear_cacheNoRestart this file's coq-lsp process before checking.
command_timeout_secondsNoPer Rocq sentence watchdog for checking. None uses the server default, 0 disables it, and positive values abort on slow sentences.
timeout_after_error_secondsNoOverall deadline once the first error has been reported: the whole check is stopped at most this many seconds after the first error. None uses the server default, 0 disables it, and positive values enable it.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full behavioral burden and does so thoroughly: first error always reported, later errors bounded by the after-error deadline, list may be truncated, long-running sentences surfaced, partial diagnostics on timeout, and cache reuse after timeouts. It also discloses the hidden side effect that the dune path may rebuild dependencies and restart the coq-lsp process, which the agent cannot learn from the schema.

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

Conciseness4/5

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

The core purpose and the error-vs-warning routing are front-loaded in the first two sentences, then deeper behavior follows. It is somewhat long and has mild redundancy between the timeout sentence and the trailing cache note, but every paragraph still carries information an agent would use.

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?

An output schema exists, so return-value detail is correctly omitted, and the description covers error reporting, caching, dune rebuilds, and timeouts. It stops short of a few operational points an agent would want, such as whether the file must be saved on disk first and how the returned error list is ordered relative to truncation.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already defines all four parameters, and the baseline would be 3. The description adds real meaning on top by naming the concrete condition that should set clear_cache = true (project files changed or dependencies rebuilt outside dune), and by framing the two timeouts as a graceful-degradation contract rather than raw knobs.

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

Purpose4/5

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

"Check a Rocq file and report diagnostics" states a concrete verb (check) and resource (Rocq file) plus the output kind (diagnostics). It does not name or differentiate from rocq_run_at, so an agent knows what the tool does but not how it differs from its sibling.

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 gives clear when-to-use guidance ("Use this to check files for errors") and an explicit exclusion for warnings, telling the agent to recompile manually instead. It also gives a conditional trigger for clear_cache = true (files changed, out-of-dune dependency rebuilds), though it never contrasts the tool with rocq_run_at.

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

Deploy Server

Other Tools