Skip to main content
Glama

pilot_intercept

Intercept network requests matching a URL pattern to mock API responses, simulate error states (401, 500), or test loading states. Customize status, headers, and body for frontend testing without a real backend.

Instructions

Intercept network requests matching a URL pattern and respond with custom status, headers, and body. Use when the user wants to mock API responses, simulate error states (401, 500), test loading states, or run frontend tests without a real backend. All requests matching the pattern are fulfilled with the given response until cleared.

Parameters:

  • pattern: URL glob pattern to intercept (e.g., "**/api/users", "/auth")

  • response: Custom response — status (default 200), body (JSON string or text), headers, contentType

  • clear: Set to true to remove all active intercepts

Returns:

  • Add mode: Confirmation and list of active intercepts.

  • clear mode: Confirmation that all intercepts were removed.

Errors:

  • "Browser not launched": Navigate to a URL first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternNoURL glob pattern to intercept (e.g., "**/api/users")
responseNoCustom response to return for matched requests
clearNoRemove all active intercepts
Behavior4/5

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

With no annotations provided, the description must disclose behavior. It explains interception persists until cleared, describes add and clear modes, and lists possible errors. However, it does not clarify whether adding a new intercept clears existing ones or how multiple intercepts interact.

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?

The description is well-structured with sections for purpose, parameters, returns, and errors. It is front-loaded with core functionality. However, some parameter descriptions repeat schema content, and the examples could be more concise.

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?

Given no output schema, the description clearly explains return values for both add and clear modes, lists errors, and details all parameters including nested objects. It provides sufficient context for an AI to invoke the tool 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?

Input schema has 100% description coverage, so baseline is 3. The description adds some extra context (default status, examples) but largely reiterates schema descriptions. Value added is moderate.

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 clearly states the tool intercepts network requests and allows custom responses. It provides specific use cases (mock API, simulate errors, test loading) that distinguish it from other browser automation tools like pilot_navigate or pilot_click.

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?

The description explicitly states when to use the tool (mock API responses, simulate error states, test loading states) but does not provide when-not-to-use or mention alternative tools. However, the context is clear and sufficient for typical use cases.

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

Install Server

Other Tools

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/TacosyHorchata/Pilot'

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