Skip to main content
Glama

lint_rtl_code

Check CSS, HTML, JSX, or TSX for layout breaks in right-to-left languages. Identifies physical properties, directional utilities, and dir issues, and provides logical replacements.

Instructions

Check a snippet of CSS, HTML, JSX or TSX for layout that breaks in right-to-left languages: physical CSS properties, directional Tailwind utilities, and dir problems. Returns each finding with the logical replacement. Use this before handing RTL-facing markup back to the user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe source to check.
baseDirNoThe base direction of the document. Pass "rtl" when the app root is <html dir="rtl">: in an Arabic-first app "right" is the start side, so the logical replacement is the opposite one. Default "ltr".
filenameYesA filename such as Button.tsx or theme.css. Only the extension matters — it selects which rules run.
Behavior4/5

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

With no annotations provided, the description carries the burden. It discloses that the tool returns each finding with the logical replacement, which is a key behavioral detail. It does not mention side effects, but being a linting tool, it is implicitly read-only. The description adds useful behavioral context beyond a simple verb.

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 two sentences, front-loaded with the main purpose and includes concrete examples (file types, problem types, return value). Every sentence earns its place; no fluff.

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?

Given the tool has 3 params, no output schema, and no annotations, the description covers the main usage, input scope, and return format. It could specify the output structure in more detail, but it gives enough for an agent to understand what to expect. Compared to the tier examples, this is above midpoint.

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?

The schema covers 100% of parameters with descriptions. The tool description adds no additional parameter-specific semantics beyond mentioning 'snippet' and 'logical replacement', which are already implied. Baseline 3 is appropriate.

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 tool checks CSS/HTML/JSX/TSX for RTL layout issues, listing specific problem categories (physical CSS properties, directional Tailwind utilities, dir problems). It is a specific verb+resource combination that distinguishes it from siblings like lint_rtl_path or detect_direction.

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?

It provides explicit context: 'Use this before handing RTL-facing markup back to the user.' This implies when to use it but doesn't explicitly mention alternatives or exclusions, though sibling tools have distinct names that imply different purposes.

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/kahlelhawary-art/rtl-mcp'

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