Skip to main content
Glama

audit_rtl

Detect RTL and bidirectional layout bugs in codebases, including physical margins, alignment, directional icons, and missing root configuration, then preview or apply logical-property fixes.

Instructions

Audits codebase for RTL (Right-to-Left) and bidirectional layout bugs, detecting physical spacing (marginLeft/Right), alignment (textAlign: left/right), directional icons, and missing RTL root configurations, with automated logical property migration.

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

Input Schema

NameRequiredDescriptionDefault
fixNoIf true, automatically converts physical style and layout properties to logical directional equivalents.
scopeNoOptional list of files or directories to limit the RTL audit to.
dryRunNoIf true (default when fix is true), previews changes via unified diff without modifying files.
projectPathNoOptional project root directory. Defaults to current working directory.
targetLocalesNoTarget locales to evaluate for RTL support (e.g. ['ar', 'he', 'fa']). Defaults to detected target locales.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose that a fix/migration mode exists ("automated logical property migration"), which is the key behavioral fact. However, it does not say that changes are preview-only by default (dryRun defaults true) or what guarantees reversibility, leaving a write-capable operation under-described.

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?

A single front-loaded sentence that names the resource first and then enumerates the bugs detected. Dense and efficient, though the trailing "with automated logical property migration" clause packs a mutating capability into the list of detections without emphasizing it.

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?

There is no output schema and no annotations across five optional parameters, so the description must cover behavior. It explains what is detected but not what the audit reports (diff output, findings format, severity) or how scope/targetLocales affect detection, leaving the agent to infer the return shape and mutation flow.

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 description coverage is 100%, including defaults for fix and dryRun, so the schema already explains every parameter. The description adds no syntax, format, or semantics beyond what the schema provides; the detection categories loosely map to what fix converts but do not elaborate on parameters.

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 ("audits codebase") plus concrete detection targets: physical spacing via marginLeft/Right, textAlign left/right, directional icons, and missing RTL root configuration. These RTL-specific categories differentiate it from the sibling audit_formatting and audit_plurals tools without needing to name them.

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?

The description implies the tool is for finding RTL/bidi layout problems, but it never states when to use it versus the other audit_* siblings, nor when not to. Nothing warns that the automated migration path mutates source files, which is the main usage decision an agent must make.

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