Skip to main content
Glama

exec

Execute trusted Playwright Python code within persistent browser profiles to automate sites, keep logins across runs, and run custom browser actions with helpers.

Instructions

Execute trusted Playwright Python with persistent session variables and helpers.

Input Schema

NameRequiredDescriptionDefault
codeYes
siteNo
profileYes
timeoutNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/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, and it does disclose two real traits: code is 'trusted' (security posture) and session variables/helpers persist across calls (state model). It omits what the code executes against, error/failure behavior, the effect of the timeout, and whether the call returns values, which matter greatly for an arbitrary-code-execution tool.

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?

A single front-loaded sentence with no filler. It is efficient but so terse that brevity shades into under-specification rather than disciplined concision.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that runs arbitrary code with side effects, accepts four undocumented parameters, has no annotations, and no output schema, one sentence is not enough. An agent cannot tell what the call returns, how failures surface, or how profile and site scope the execution.

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

Parameters2/5

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

Schema description coverage is 0% across four parameters, so the description must compensate and does not. Nothing explains what 'profile' selects, what 'site' binds to, or how 'timeout' is applied; only 'persistent session variables' loosely gestures at why a profile might exist.

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?

Names a specific verb ('Execute') and resource ('Playwright Python'), and adds the distinguishing trait that session variables and helpers persist. It does not explicitly contrast itself with siblings like open, snap, or close, so an agent must infer that exec is the escape hatch for arbitrary scripting rather than the structured navigation tools.

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 gives no when-to-use guidance and no alternatives: it never says to prefer open/snap for standard navigation and reserve exec for cases those tools cannot express. The word 'trusted' hints at a precondition but is not explained as a usage rule.

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

Deploy Server

Other Tools