Skip to main content
Glama

audit_component

Validate a Symbols/DOMQL component string against the deterministic ruleset. Get violations and warnings instantly to verify code before saving, even without CLI access.

Instructions

Inline VALIDATOR for a single Symbols/DOMQL component string.

Runs the deterministic ruleset (flat element API, signal reactivity, design system tokens, declarative fetch/polyglot/helmet/router, no DOM manipulation, Rule 62 icon ban) against an in-memory string of code. Returns a tight report with violations + warnings.

Use this:

  • During generation, to verify a freshly-generated component before saving

  • In any client without shell access (claude.ai web, hosted MCP) where the CLI is unreachable

  • On a single file's contents, not a whole project

Adjacent tools — call these for different scopes:

  • audit_project() — returns the MULTI-PHASE PROJECT AUDIT PLAYBOOK (instructions for the agent to follow). Use when the user asks for a full project audit.

  • bin/symbols-audit <symbols-dir> (CLI, ships with this package) — filesystem regex sweep across an entire project. Use during the playbook's static-audit phase.

By default returns ONLY the findings (≈1–2K chars). Pass include_playbook=True to also dump the AUDIT.md playbook in the same response when you don't already have it.

Args: component_code: The JavaScript/DOMQL source string to validate. include_playbook: Append the full audit playbook to the response. Default False to keep responses small. Default agents should NOT set this — call audit_project() separately if the playbook is needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
component_codeYes
include_playbookNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that validation happens 'against an in-memory string of code' (implying no side effects), that it returns 'a tight report with violations + warnings', and that by default it returns 'ONLY the findings (≈1–2K chars)' unless include_playbook=True. It also warns default agents should not set include_playbook. This is strong, though it doesn't explicitly state whether any external state is modified or if authentication is needed.

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?

The description is longer than the minimal example, but it is well-structured with bolded headers, bullet lists, and distinct sections for usage and args. Every section earns its place, though some redundancy exists (e.g., repeating that include_playbook defaults to False). It is front-loaded with the core purpose.

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's complexity (a deterministic ruleset) and the presence of an output schema (not shown), the description provides enough context: it names the rule categories, describes the return report, explains output size, and references the audit playbook. It also integrates well with sibling tools and the CLI, making the overall usage context complete. The output schema can handle formal return details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description's Args section fully explains both parameters. component_code is defined as 'The JavaScript/DOMQL source string to validate,' and include_playbook is described with its default, effect ('Append the full audit playbook to the response'), and guidance to keep it False. This fully compensates for the missing schema descriptions.

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 is an 'Inline VALIDATOR for a single Symbols/DOMQL component string' and lists exactly what the deterministic ruleset checks. It distinguishes itself from sibling tools by explicitly naming adjacent tools and their different scopes.

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?

The 'Use this' section provides specific scenarios (during generation, in clients without shell access, on a single file) and the 'Adjacent tools' section explicitly names audit_project and bin/symbols-audit as alternatives for different scopes. This gives clear when-to-use and when-not-to-use guidance.

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/symbo-ls/symbols-mcp'

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