Skip to main content
Glama

BrightLocal MCP Server and API by Cotlet

Run a script on the page

cotlet_browser_evaluate
Destructive

Runs a JavaScript function body on the page and answers what it returns, as JSON. Use it to extract data the page holds (a table, a list, attributes); act with the other tools. It cannot send requests, click, submit, or read cookies or storage; a filled field's value reads [hidden by Cotlet]. Example: return [...document.querySelectorAll('h2')].map(h => h.innerText)

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": {
      "script": "<script>"
    },
    "name": "cotlet_browser_evaluate"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabNoThe Tab id of the last answer. The step acts only while that tab is the shown one; if the user or another client showed another tab, it does nothing and answers tab_changed. Leave it out to act on the shown tab.
scriptYesA function body that returns.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / tab
      Added value: +{
      +  "description": "The Tab id of the last answer. The step acts only while that tab is the shown one; if the user or another client showed another tab, it does nothing and answers tab_changed. Leave it out to act on the shown tab.",
      +  "maxLength": 64,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and openWorldHint=true, so the safety profile is partly covered. The description adds genuinely non-obvious behavior: the sandbox cannot send requests, click, submit, or read cookies/storage, and filled fields read as '[hidden by Cotlet]' — a quirk an agent could not infer anywhere else. It is silent on whether script-induced page mutations persist, which would be valuable given destructiveHint=true.

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?

It is a single dense paragraph with the purpose front-loaded and no filler; each sentence carries either capability, limitation, or example. Slightly compressed — the trailing example is tacked on without an introductory cue, and 'answers what it returns, as JSON' repeats the return-type point.

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?

With only two fully documented parameters and no output schema, the description does the extra work of stating that results come back as JSON. It covers limits and an example, leaving only side-effect/persistence behavior and timing relative to page load unaddressed.

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

Parameters4/5

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

Schema coverage is 100%, so both parameters are already documented, including the tab_changed behavior. The description still adds real meaning by specifying that 'script' is a function body that returns, and by giving a concrete querySelectorAll example that shows expected syntax and the implicit return convention.

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 first sentence gives a precise verb and resource: it runs a JavaScript function body on the page and returns the result as JSON. The following clause separates it from the action-oriented siblings ('act with the other tools'), so an agent can tell it apart from cotlet_browser_read or cotlet_browser_click without opening any schema.

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?

It gives a clear when-to-use rule — extract data the page holds (table, list, attributes) — and routes acting to the other tools. It does not name the specific alternative tools (e.g. click, fill_form) for the action cases, so the routing is directional rather than exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources