Skip to main content
Glama

typecheck

Read-only

Check Luau types against a synced place mirror to catch type errors, undefined globals, and bad require paths before code runs.

Instructions

Type-check Luau with luau-lsp (the Luau analyzer) over a place's synced script mirror — catches type errors, undefined globals, and bad require paths BEFORE the code runs. Read-only: reports findings, changes nothing. Resolves requires via a sourcemap (uses sourcemap.json if present, else synthesizes one) and Roblox globals via type defs (TUFAN_LUAU_DEFS, a project globalTypes.d.luau, or an auto-cached download). Scope with paths or check the whole mirror. Needs luau-lsp installed (auto-detected or TUFAN_LUAU_LSP_PATH).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "typecheck"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathsNofiles/dirs relative to the script-mirror root (default: the whole mirror)
placeNoTarget place (PlaceId or project name). Defaults to the bound/sole connected place.
timeoutSecondsNomax seconds for the run (default 120, max 600)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations: it discloses the luau-lsp dependency and how it is located (auto-detect or TUFAN_LUAU_LSP_PATH), how requires are resolved via a sourcemap (existing sourcemap.json or a synthesized one), how Roblox globals are supplied (TUFAN_LUAU_DEFS, globalTypes.d.luau, or an auto-cached download), and that it mutates nothing. These are exactly the prerequisites an agent needs to anticipate failures.

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?

Purpose and read-only guarantee are front-loaded, and the parenthetical detail about defs sources is dense but relevant. A few nested parentheticals make it longer than necessary, though no sentence is pure filler.

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 zero-required-param analysis tool with no output schema, it covers prerequisites, resolution behavior, and scope selection well. The one gap is the shape of the report itself — how findings are returned (per-file? counts? severity?) is only implied by "reports findings."

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 coverage is 100%, and the schema already documents `paths` (default whole mirror) and `place` (defaults to bound/sole connected place). The description's "Scope with `paths` or check the whole mirror" essentially restates the schema and adds no syntax or format detail for `paths`, and `timeoutSeconds` is not mentioned at all. Baseline 3 applies.

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?

States a specific verb and resource ("Type-check Luau with luau-lsp") plus the exact scope ("a place's synced script mirror") and the classes of defects caught (type errors, undefined globals, bad require paths). Clearly distinct from siblings like format_scripts or cloud_luau.

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?

Gives a clear when-to-use hook ("BEFORE the code runs") and explains the scope choice ("Scope with `paths` or check the whole mirror"). It does not name sibling alternatives or state when not to use it, so it falls short of a 5.

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