Skip to main content
Glama

electron_generate_locator

Generate a reliable locator strategy for an Electron app element from a plain description, such as "login button", so automation scripts can find and target the right UI element.

Instructions

Generate a robust locator strategy for an element based on description.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "description": "<description>"
    },
    "name": "electron_generate_locator"
  }
}

Input Schema

NameRequiredDescriptionDefault
descriptionYesDescription of the element to find (e.g., "login button", "email input")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does not state whether generation is a pure/read-only operation, what format the locator strategy takes, or whether it depends on a live page or prior snapshot.

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 a single front-loaded sentence with no wasted clauses. 'Robust' is mildly promotional filler, but the sentence is otherwise efficient.

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?

For a one-parameter tool with full schema coverage, the input side is adequately described. However, with no output schema, the description should explain what a 'locator strategy' returns—single selector, ranked alternatives, or structured data—and it does not.

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%, and the single 'description' parameter already includes an example in the schema. The tool description adds only the phrase 'based on description' and no additional syntax or constraints, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Generate') and resource ('locator strategy for an element') with the input basis. It does not differentiate from sibling tools such as electron_verify_element_visible or electron_generate_test, which also concern element targeting.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no when-to-use guidance, prerequisites, or alternatives. An agent must infer whether this is for selector generation versus clicking, verifying, or snapshotting.

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