Skip to main content
Glama

check_event_usage

Validate event usage in web component code by checking against the Custom Elements Manifest. Detects React onXxx props, misspelled events, and framework-specific binding mistakes for React, Vue, and Angular.

Instructions

Validates event listener patterns against a component CEM — catches React onXxx props for custom events (won't work), unknown event names, misspelled events, and framework-specific binding mistakes. Supports React, Vue, and Angular patterns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
libraryIdNoOptional library ID to target a specific loaded library instead of the default.
codeTextYesThe code (JSX, template, etc.) to validate event usage in.
tagNameYesThe custom element tag name to validate against (e.g. "sl-button").
frameworkNoOptional framework hint. Enables framework-specific checks (e.g. React onXxx prop detection).
Behavior3/5

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

No annotations are provided, so the description bears full responsibility. It explains the validation behavior (catches error patterns) but does not disclose non-obvious traits such as whether it modifies state, requires network access, or has side effects. It could mention that the tool is read-only or expect a loaded library.

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-loading the core action ('validates event listener patterns') and immediately specifying the types of errors caught. Every sentence adds value, with no redundant or filler content.

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?

The tool has no output schema, so the description could describe return values or response format. It covers the main validation aspects and frameworks but omits what the user gets back (e.g., list of issues). Given the tool's simplicity and clear purpose, the description is largely complete.

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 baseline is 3. The description does not add any extra semantics beyond the schema; it only restates the overall purpose without detailing how each parameter influences behavior.

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 validates event listener patterns against a component CEM, listing specific errors it catches (React onXxx, unknown names, misspellings, binding mistakes) and supported frameworks (React, Vue, Angular). It differentiates from sibling tools like check_method_calls or check_html_usage by focusing exclusively on event-related validation.

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?

The description specifies when to use the tool (for validating event patterns and catching framework-specific mistakes) and lists supported frameworks, but does not explicitly mention when not to use it or provide alternatives among siblings. The context is clear but lacks exclusions.

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/bookedsolidtech/helixir'

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