Skip to main content
Glama

清空 Mock 规则

browser_clear_mocks
DestructiveIdempotent

Removes request-mock rules from the active tab and stops intercepting, either all rules or a single one by rule id. Returns the number of rules removed.

Instructions

Remove all (or one, by rule id) request-mock rules of the active tab and stop intercepting. Pass id to remove a single rule. Returns how many were removed.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "browser_clear_mocks"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoRule id to remove (omit to clear all)
tabIdNoTab id (default: active tab)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, so the safety profile is covered. The description adds real value beyond them by disclosing the side effect ('stop intercepting') and the return value ('Returns how many were removed'), which no output schema provides.

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?

Three short sentences with zero waste; the primary action and its scope lead, followed by the mode selector and the return value. Nothing is redundant.

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

Completeness5/5

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

For a two-parameter, zero-required tool with full schema coverage, the description covers action, scope, mode selection, side effect, and return value. An agent has everything needed to call it correctly.

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

Parameters3/5

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

Schema description coverage is 100% and both parameters already carry descriptions including defaults, so the schema does the heavy lifting. The description only restates the id semantics and says nothing about tabId beyond what the schema states.

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?

States a specific verb and resource ('Remove all ... request-mock rules of the active tab') plus the scope qualifier 'stop intercepting'. The list-vs-remove distinction against siblings like browser_list_mocks or browser_mock_requests is implied by the verb but no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Pass id to remove a single rule' clearly explains the two modes of use (single vs clear-all) and the condition that selects each. It stops short of naming an alternative tool for related operations or stating any when-not-to-use case.

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