Skip to main content
Glama

evaluate_js

Evaluate JavaScript expressions in a live Odoo page to access the web client environment and inspector for UI automation and debugging. Requires ODOO_MCP_ALLOW_JS=1.

Instructions

Escape hatch: evaluate a JavaScript expression in the Odoo page (async allowed; env = the web client env, __mcp = the injected inspector). Disabled unless ODOO_MCP_ALLOW_JS=1. Result truncated at 20 kB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses async execution, the available context objects `env` and `__mcp`, the opt-in environment variable requirement, and the 20 kB truncation limit. This goes well beyond what is normally provided.

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 compact and front-loaded: purpose first, then execution context, then constraints. Each sentence adds a distinct piece of information with no filler or redundancy.

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?

It covers the parameter, execution context, enablement condition, and output truncation, and an output schema exists to describe return values. It could additionally warn about potential destructive side effects or error behavior, but overall it is quite complete for an arbitrary JS evaluation tool.

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 0%, but there is only one self-descriptive parameter, `expression`. The description clarifies that the expression is JavaScript, that async is allowed, and that `env` and `__mcp` are in scope, adding meaningful context beyond the bare 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 states a specific verb and resource: it evaluates a JavaScript expression in the Odoo page. The 'Escape hatch' framing and the mention of arbitrary JS clearly distinguish it from the sibling tools, which are targeted UI/ORM operations.

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?

It calls itself an 'Escape hatch,' implying use when other tools are insufficient, and it gives a hard prerequisite (ODOO_MCP_ALLOW_JS=1). However, it never explicitly says when to prefer it over siblings or what conditions would make it the wrong choice.

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