Skip to main content
Glama

Close web debug session

web_session_close
DestructiveIdempotent

Close an active browser debugging session to release all associated browser resources and prevent memory leaks.

Instructions

Close the selected session and release any browser resources owned by it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYes
artifactPolicyNoretain

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
dataNo
errorNo
warningsYes
artifactsYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed7 schema fields changedv0.7.0
    • removedOutput schema / definitions / __schema1
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "boolean"
      -    },
      -    {
      -      "type": "null"
      -    },
      -    {
      -      "items": {
      -        "$ref": "#/definitions/__schema1"
      -      },
      -      "type": "array"
      -    },
      -    {
      -      "additionalProperties": {
      -        "$ref": "#/definitions/__schema1"
      -      },
      -      "propertyNames": {
      -        "type": "string"
      -      },
      -      "type": "object"
      -    }
      -  ]
      -}
    • addedOutput schema / properties / data / additionalProperties
      Added value: +false
    • removedOutput schema / properties / data / allOf
      Removed value: -[
      -  {
      -    "$ref": "#/definitions/__schema0"
      -  }
      -]
    • addedOutput schema / properties / data / properties
      Added value: +{
      +  "artifactDir": {
      +    "maxLength": 4096,
      +    "type": "string"
      +  },
      +  "artifactState": {
      +    "enum": [
      +      "retained",
      +      "deleted"
      +    ],
      +    "type": "string"
      +  },
      +  "authFixture": {
      +    "enum": [
      +      "seeded-disposable",
      +      "none"
      +    ],
      +    "type": "string"
      +  },
      +  "createdAt": {
      +    "maxLength": 100,
      +    "type": "string"
      +  },
      +  "id": {
      +    "format": "uuid",
      +    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +    "type": "string"
      +  },
      +  "projectCapabilities": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "angular": {
      +        "type": "boolean"
      +      },
      +      "browserTarget": {
      +        "type": "boolean"
      +      },
      +      "next": {
      +        "type": "boolean"
      +      },
      +      "react": {
      +        "type": "boolean"
      +      },
      +      "serverRuntime": {
      +        "type": "boolean"
      +      },
      +      "vite": {
      +        "type": "boolean"
      +      },
      +      "vue": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "browserTarget",
      +      "react",
      +      "angular",
      +      "vue",
      +      "vite",
      +      "next",
      +      "serverRuntime"
      +    ],
      +    "type": "object"
      +  },
      +  "projectRoot": {
      +    "maxLength": 4096,
      +    "type": "string"
      +  },
      +  "runtimeCapabilities": {
      +    "anyOf": [
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "accessibility": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          },
      +          "actions": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          },
      +          "authSeeding": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          },
      +          "browser": {
      +            "enum": [
      +              "chromium",
      +              "safari"
      +            ],
      +            "type": "string"
      +          },
      +          "console": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          },
      +          "dom": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          },
      +          "evaluation": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          },
      +          "javascriptDebugger": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          },
      +          "locators": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "css": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "provenance": {
      +                    "items": {
      +                      "enum": [
      +                        "playwright",
      +                        "chromium-cdp",
      +                        "safari-webdriver",
      +                        "safari-bidi",
      +                        "performance-resource-timing",
      +                        "session-policy",
      +                        "webmcp-page-api"
      +                      ],
      +                      "type": "string"
      +                    },
      +                    "maxItems": 2,
      +                    "type": "array"
      +                  },
      +                  "reason": {
      +                    "maxLength": 500,
      +                    "type": "string"
      +                  },
      +                  "state": {
      +                    "enum": [
      +                      "supported",
      +                      "degraded",
      +                      "unsupported"
      +                    ],
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "state",
      +                  "provenance"
      +                ],
      +                "type": "object"
      +              },
      +              "semantic": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "provenance": {
      +                    "items": {
      +                      "enum": [
      +                        "playwright",
      +                        "chromium-cdp",
      +                        "safari-webdriver",
      +                        "safari-bidi",
      +                        "performance-resource-timing",
      +                        "session-policy",
      +                        "webmcp-page-api"
      +                      ],
      +                      "type": "string"
      +                    },
      +                    "maxItems": 2,
      +                    "type": "array"
      +                  },
      +                  "reason": {
      +                    "maxLength": 500,
      +                    "type": "string"
      +                  },
      +                  "state": {
      +                    "enum": [
      +                      "supported",
      +                      "degraded",
      +                      "unsupported"
      +                    ],
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "state",
      +                  "provenance"
      +                ],
      +                "type": "object"
      +              }
      +            },
      +            "required": [
      +              "css",
      +              "semantic"
      +            ],
      +            "type": "object"
      +          },
      +          "network": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          },
      +          "pageRuntimeEnrichment": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          },
      +          "schemaVersion": {
      +            "const": 2,
      +            "type": "number"
      +          },
      +          "screenshots": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          },
      +          "tlsBypass": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          },
      +          "transport": {
      +            "enum": [
      +              "chromium-launch",
      +              "chromium-cdp-attach",
      +              "safari-webdriver"
      +            ],
      +            "type": "string"
      +          },
      +          "viewportMatrix": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          },
      +          "webmcp": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "provenance": {
      +                "items": {
      +                  "enum": [
      +                    "playwright",
      +                    "chromium-cdp",
      +                    "safari-webdriver",
      +                    "safari-bidi",
      +                    "performance-resource-timing",
      +                    "session-policy",
      +                    "webmcp-page-api"
      +                  ],
      +                  "type": "string"
      +                },
      +                "maxItems": 2,
      +                "type": "array"
      +              },
      +              "reason": {
      +                "maxLength": 500,
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "supported",
      +                  "degraded",
      +                  "unsupported"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "provenance"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "schemaVersion",
      +          "browser",
      +          "transport",
      +          "actions",
      +          "locators",
      +          "dom",
      +          "console",
      +          "network",
      +          "screenshots",
      +          "javascriptDebugger",
      +          "evaluation",
      +          "accessibility",
      +          "pageRuntimeEnrichment",
      +          "viewportMatrix",
      +          "tlsBypass",
      +          "authSeeding",
      +          "webmcp"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  },
      +  "schemaVersion": {
      +    "const": 3,
      +    "type": "number"
      +  },
      +  "status": {
      +    "enum": [
      +      "starting",
      +      "ready",
      +      "paused",
      +      "failed",
      +      "closed"
      +    ],
      +    "type": "string"
      +  },
      +  "target": {
      +    "anyOf": [
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "browser": {
      +            "enum": [
      +              "chromium",
      +              "safari"
      +            ],
      +            "type": "string"
      +          },
      +          "isolated": {
      +            "type": "boolean"
      +          },
      +          "isolation": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "browserProcess": {
      +                "type": "boolean"
      +              },
      +              "cache": {
      +                "type": "boolean"
      +              },
      +              "context": {
      +                "type": "boolean"
      +              },
      +              "navigation": {
      +                "type": "boolean"
      +              },
      +              "profile": {
      +                "type": "boolean"
      +              },
      +              "serverState": {
      +                "type": "boolean"
      +              },
      +              "serviceWorkers": {
      +                "type": "boolean"
      +              },
      +              "storage": {
      +                "type": "boolean"
      +              }
      +            },
      +            "required": [
      +              "browserProcess",
      +              "context",
      +              "profile",
      +              "storage",
      +              "cache",
      +              "serviceWorkers",
      +              "navigation",
      +              "serverState"
      +            ],
      +            "type": "object"
      +          },
      +          "mode": {
      +            "enum": [
      +              "launch",
      +              "attach",
      +              "webdriver"
      +            ],
      +            "type": "string"
      +          },
      +          "remote": {
      +            "type": "boolean"
      +          },
      +          "schemaVersion": {
      +            "const": 1,
      +            "type": "number"
      +          },
      +          "targetId": {
      +            "maxLength": 200,
      +            "type": "string"
      +          },
      +          "title": {
      +            "maxLength": 300,
      +            "type": "string"
      +          },
      +          "url": {
      +            "maxLength": 2560,
      +            "type": "string"
      +          },
      +          "viewport": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "height": {
      +                    "maximum": 9007199254740991,
      +                    "minimum": -9007199254740991,
      +                    "type": "integer"
      +                  },
      +                  "width": {
      +                    "maximum": 9007199254740991,
      +                    "minimum": -9007199254740991,
      +                    "type": "integer"
      +                  }
      +                },
      +                "required": [
      +                  "width",
      +                  "height"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "schemaVersion",
      +          "browser",
      +          "remote",
      +          "url",
      +          "title",
      +          "viewport",
      +          "isolated"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  },
      +  "tls": {
      +    "enum": [
      +      "strict",
      +      "allow-insecure-loopback"
      +    ],
      +    "type": "string"
      +  },
      +  "url": {
      +    "maxLength": 2560,
      +    "type": "string"
      +  },
      +  "warnings": {
      +    "items": {
      +      "maxLength": 500,
      +      "type": "string"
      +    },
      +    "maxItems": 100,
      +    "type": "array"
      +  }
      +}
    • addedOutput schema / properties / data / required
      Added value: +[
      +  "schemaVersion",
      +  "id",
      +  "projectRoot",
      +  "url",
      +  "status",
      +  "createdAt",
      +  "artifactDir",
      +  "target",
      +  "projectCapabilities",
      +  "runtimeCapabilities",
      +  "warnings"
      +]
    • addedOutput schema / properties / data / type
      Added value: +"object"
    • changedOutput schema / properties / error / properties / details / allOf
      Previous value: -[
      -  {
      -    "$ref": "#/definitions/__schema1"
      -  }
      -]New value: +[
      +  {
      +    "$ref": "#/definitions/__schema0"
      +  }
      +]
  2. First observedv0.5.0-next.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true. The description adds useful behavioral context by stating that browser resources owned by the session are released, which goes beyond what annotations alone convey. It does not contradict any annotation.

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?

A single front-loaded sentence with no filler. 'Close the selected session' carries the main purpose, and 'release any browser resources owned by it' adds meaningful consequence without redundancy.

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?

For a simple two-parameter destructive tool with output schema and strong annotations, the description is mostly adequate. The main gap is that artifactPolicy is not described, so an agent cannot confidently know what 'delete' will destroy. Otherwise, safety and idempotency are covered by annotations.

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% and the description does not explain either parameter. sessionId is inferable from the tool name, but artifactPolicy's retain/delete values are ambiguous: it is not stated what is retained or deleted, when the default applies, or how it interacts with closing the session.

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 states a concrete action ('Close the selected session') and a resource ('session'), and adds a meaningful consequence: releasing browser resources. This distinguishes it from siblings like web_session_start and web_session_status, though 'selected' is slightly vague without referencing the sessionId parameter.

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 is implied by the verb and title: call this when a session should be ended. However, the description provides no explicit when/when-not guidance, no mention of cleanup flow, and does not differentiate from related lifecycle tools such as web_debug_control or web_session_status.

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

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/MarlonJD/web-debug-mcp'

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