Skip to main content
Glama
zeshuochen

nekoro-browser-mcp

by zeshuochen

js

Execute JavaScript in the current browser tab and receive the completion value. Handles top-level return statements and converts special values like Infinity, NaN, and BigInt to Python equivalents, while reporting page errors transparently.

Instructions

js("document.title") — 在页面执行 JS,返回完成值。tab 不传打当前活动标签。 先按裸表达式/脚本 eval(document.title 直接返回标题);顶层 return 触发 "Illegal return statement" 时自动包进函数重试(return x 也能用)。 不可 JSON 序列化的值(Infinity/NaN/-0/BigInt)解码回 Python 值,不再吐原始 dict。 页内异常 / eval 出错 → ok:false,不伪造成功。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabNo
codeYes
Behavior5/5

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

With no annotations, the description takes full responsibility for disclosing behavior. It explains evaluation semantics (bare expression vs. script), automatic function wrapping for 'return', how non-serializable values are handled (Infinity/NaN/-0/BigInt), and error behavior (returns ok:false rather than faking success).

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?

Every sentence contributes value, covering usage, edge cases, and error handling in a compact format. The description is front-loaded with the primary purpose and immediately provides an illustrative example.

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?

For a JS execution tool, the description covers the core semantics, error handling, and non-standard values. It could gently mention the structure of the successful return value (e.g., ok:true), but given the lack of an output schema, the current detail is largely sufficient.

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?

Although schema coverage is 0%, the description thoroughly clarifies both parameters: 'code' contains the JavaScript expression/script, and 'tab' defaults to the active tab. It adds significant meaning beyond the raw schema.

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 executes JS in the page and returns the completion value, with a concrete example ('document.title'). It is easily distinguishable from sibling tools like click or navigate, which have different purposes.

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

Usage Guidelines3/5

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

Usage context is implied through examples (e.g., bare expression vs. script, tab defaulting to active tab), but there is no explicit guidance on when to choose this over alternatives like cdp or exec_python. The description implies usage but does not provide exclusions or mention alternatives.

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/zeshuochen/nekoro-browser'

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