Skip to main content
Glama
Electron Debug MCP Server

Electron Debug MCP Server

by amafjarkasi

set_cookie

Sets a cookie on a page using a URL or domain, defaulting to the current page location; file:// pages require an http(s) URL or domain to accept it.

Instructions

Set a cookie on the page (provide url or domain; defaults to current location.href). file:// pages usually reject cookies unless you pass an http(s) url or domain.

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": {
      "name": "<name>",
      "value": "<value>"
    },
    "name": "set_cookie"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
nameYes
pathNo
valueYes
domainNo
secureNo
expiresNoUnix time in seconds
httpOnlyNo
sameSiteNo
targetIdNo
processIdNoTarget process ID. Omit if only one app is running.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.15.1

TDQS

B3.1/5.0
Behavior3/5

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

The only annotation is destructiveHint=false, which says little. The description adds meaningful behavioral context by warning that file:// contexts will fail without an http(s) url or domain, but it says nothing about overwriting existing same-name cookies, failure reporting, or persistence behavior for expires.

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?

Two compact clauses with the primary action front-loaded and the caveat second. No filler, though the parenthetical default could be stated more crisply.

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 an 11-parameter tool with no output schema and minimal annotations, the description covers only the url/domain dimension. An agent still lacks guidance on the cookie attributes it must supply (path, secure, httpOnly, sameSite, expires) and on the targetId/processId targeting semantics.

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 only 18% across 11 parameters (only expires is documented inline). The description explains the url/domain fallback but leaves name, value, path, secure, httpOnly, sameSite, targetId, and processId entirely unexplained in both schema and description, so it does not compensate for the gap.

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?

The description opens with a specific verb and resource ('Set a cookie on the page') and immediately clarifies the scoping default (current location.href). This clearly separates it from delete_cookie, though it does not explicitly call out that sibling.

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 gives a useful conditional caveat: file:// pages usually reject cookies unless an http(s) url or domain is supplied. That is real usage guidance but it is scoping advice rather than a when-to-use/when-not-to-use rule or a named alternative, so it stays at implied guidance.

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