Skip to main content
Glama
Comet MCP Server

Comet MCP Server

by AdilShaikh1

comet_evaluate

Evaluates JavaScript expressions on the current Comet page to run DOM queries, extract data, or manipulate pages when other browser tools do not cover the task.

Instructions

Evaluate a JavaScript expression in the current Comet page.

Powerful but use with care — string results are sanitized for injection detection. Use for DOM queries, data extraction, or page manipulation that other tools don't cover.

Args: expression: JavaScript expression to evaluate (e.g. 'document.title').

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": {
      "expression": "<expression>"
    },
    "name": "comet_evaluate"
  }
}

Input Schema

NameRequiredDescriptionDefault
expressionYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that string results are sanitized for injection detection and that the tool is "powerful" and should be used with care, but it omits whether evaluation can mutate page state, whether async/promises are awaited, or any privilege requirements.

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 warning is front-loaded and the usage sentence follows, with an Args block giving the parameter example. Slightly verbose for a one-parameter tool, but no sentence is filler.

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?

An output schema exists, so return values need not be described, and the sanitization caveat is stated. However, for an arbitrary-code-execution tool with no annotations, the absence of any note on side effects, async handling, or failure behavior leaves a meaningful gap.

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 description coverage is 0% for the single required parameter, so the description must compensate. It does: it identifies the parameter as a JavaScript expression and supplies a concrete example ('document.title'), which is enough for an agent to form a valid call.

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?

"Evaluate a JavaScript expression in the current Comet page" gives a specific verb and scope, so it is clearly distinguishable from click/type/read_page siblings. It stops short of naming which sibling to prefer in a given situation, so it is clear but not maximally differentiated.

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?

"Use for DOM queries, data extraction, or page manipulation that other tools don't cover" implies a fallback role and gives example use cases, but it never names an alternative tool or states an explicit when-not condition. The guidance is implied rather than operational.

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