Skip to main content
Glama

check_method_calls

Validates JavaScript/TypeScript code for correct method and property usage on web components, catching hallucinated API calls, typos, and improper usage.

Instructions

Validates JavaScript/TypeScript code for correct method and property usage on web components — catches hallucinated API calls (methods that do not exist), properties called as methods (e.g. dialog.open() when open is a boolean), methods assigned as properties (e.g. dialog.show = true), and typos with suggestions. Run this on any JS code that interacts with web component APIs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
libraryIdNoOptional library ID to target a specific loaded library instead of the default.
codeTextYesThe JavaScript/TypeScript code to validate for method/property usage.
tagNameYesThe custom element tag name to validate against (e.g. "sl-dialog").
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses what the tool catches (hallucinated calls, type mismatches, typos) and provides examples. It does not mention side effects, permissions, or output format, but the tool's analytic nature makes this acceptable.

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 that efficiently convey purpose, examples, and usage guidance. Each sentence adds value; no fluff.

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?

Given no output schema, the description should explain what the tool returns. It mentions 'catches' issues but does not describe the output format (e.g., list of errors, suggestions). This gap reduces completeness for a validation tool.

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 adds minimal extra meaning beyond the schema's parameter descriptions (e.g., libraryId is optional). While it clarifies the role of codeText and tagName, it does not provide significant new information.

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 JavaScript/TypeScript code for correct method and property usage on web components, listing specific error types (hallucinated API calls, properties as methods, methods as properties, typos). It distinguishes from sibling tools like check_html_usage or check_event_usage by focusing on method/property correctness.

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 gives clear context: 'Run this on any JS code that interacts with web component APIs.' It implies appropriate use cases but does not explicitly state when not to use it or list alternatives, though sibling diversity provides implicit differentiation.

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