Skip to main content
Glama

Verify formal (real Lean kernel)

verify_formal

Run the real Lean 4 kernel on a snippet to verify a formal claim. Returns typecheck verdict or honest UNDETERMINED when no snippet provided.

Instructions

Run the REAL Lean 4 kernel on a Lean snippet and report whether it typechecks; honest UNDETERMINED (with a remediation) when no snippet or no toolchain. Use to kernel-check a formal claim you wrote — find declaration names first with search_formal_math. Args: statement (what is being claimed), lean (the Lean 4 snippet — REQUIRED for a real check, e.g. 'example : 2 + 2 = 4 := rfl').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statementYesthe claim being checked
leanNoLean 4 snippet to kernel-check, e.g. "example : 2 + 2 = 4 := rfl" (omit it and the verdict is an honest UNDETERMINED — statement text alone is not checkable)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statementNo
lean_providedNo
lean_availableYes
tierNo
typechecksYes
appliesNo
checkedYestrue iff the Lean kernel actually ran and gave a verdict
detailNo
remediationNopresent iff not checked — exactly what unblocks a real kernel check
noteNo
Behavior5/5

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

No annotations provided, so description carries full burden. It discloses that it runs the real kernel, returns typecheck result or UNDETERMINED when no snippet/toolchain, and mentions a remediation for UNDETERMINED. No contradictions.

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 concise and well-structured, front-loading the core function and then adding details. Every sentence serves a purpose without redundancy.

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

Completeness5/5

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

Given the tool has an output schema (known from context), the description adequately covers when to use, prerequisites, parameter semantics, and edge cases. No missing aspects for a two-parameter tool.

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% with both parameters having descriptions. The description reinforces these by explaining 'statement' as the claim and 'lean' as the snippet, providing an example. This adds some value but does not go significantly beyond the schema.

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 it runs the REAL Lean 4 kernel to typecheck a snippet and reports whether it succeeds. It differentiates from siblings by mentioning 'kernel-check a formal claim' and referencing search_formal_math for finding declaration names first.

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

Usage Guidelines5/5

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

Explicitly states when to use: to kernel-check a formal claim. Provides prerequisite advice: find declaration names with search_formal_math first. Clarifies that the 'lean' parameter is required for a real check, else returns UNDETERMINED.

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/Archerkattri/mathlas'

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