Skip to main content
Glama

check_lint_rule

Read-onlyIdempotent

Validate a custom JavaScript lint rule across all compositions, reporting load or runtime errors and rule findings so you can confirm it catches the intended design issue.

Instructions

Check a code rule the agent wrote with its own file tools: lint/.ts, a module that does export default { description, severity?, frames?, themes?, check(x) } written as plain JavaScript (no type annotations or imports: the web version runs it untranspiled, and everything it needs comes in x), for what a bound on one feature cannot say (a share of the frame, a relation between elements, a pixel measure). check gets x.doc (the compiled composition), x.groups (the composition itself, with an empty id, and the compositions nested in it, each with its elements), x.features(element) (every feature taste rules use; a nested composition's id gives its own), x.box(element), x.color (oklch, deltaE, contrast, family; a colour is a hex string or a pixel [r, g, b] from at) and, with frames: true, x.frames: the middle frame of each shot painted (light, or themes), with width, height, RGBA data and at(x, y) in composition pixels. It returns [{ message, fix?, layer?, t?, severity? }], reported as project/ on every composition and asset lint checks; guard_example proves one catches a bad example. With id: loads the file and runs it on every composition, and answers with what it finds on each now (with render, also the rules that read frames), or fails with why it does not load or run. Without id: every code rule and whether it loads.

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": "check_lint_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoRule id: lint/<id>.ts
renderNoAlso paint frames for a rule that reads pixels

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.2
    • addedInput schema / properties / id / description
      Added value: +"Rule id: lint/<id>.ts"
  2. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/closed-world, but the description adds genuinely non-obvious behavior: the tool loads and executes agent-authored code across every composition, returns per-composition findings, and reports load/run failures with reasons. It also discloses the return array shape and the project/<id> reporting namespace, which annotations cannot convey.

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

Conciseness2/5

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

The definition is a single sprawling multi-clause sentence with deeply nested parentheses, forcing the reader to parse the module contract, the x-context API, and both operating modes in one breath. The content is valuable but the structure is poor and not front-loaded beyond the first clause.

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 tool that executes arbitrary user code, the description covers the module shape, the full x-context surface, the return contract, and both with-id and without-id behaviors. With no output schema, this is close to sufficient; only error semantics beyond 'fails with why' are thin.

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%, so both parameters are already documented. The description adds some meaning, notably that `render` enables rules that read frames and that `id` triggers execution across every composition, but it largely restates the schema's own wording rather than adding syntax or edge-case detail.

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?

The opening clause names a specific verb and resource: checking a code rule the agent authored at lint/<id>.ts, and it even specifies the module contract. It does not clearly differentiate from the `lint` sibling or say when to reach for this versus running `lint` directly, so it stops short of a 5.

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?

Usage is implied through the two modes: 'With id: loads the file and runs it on every composition' versus 'Without id: every code rule and whether it loads.' That is useful mode-based guidance, but there is no explicit statement of when to use this tool instead of `lint`, `guard_example`, or `check_examples`, leaving the agent to infer the routing.

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