fetch

fetch is a command for coding agents from yurilopes/pydoll-mcp-server. It costs 0 tokens per session (851 once invoked), scanned A, original, MIT.

A set of commands for intercepting and handling web requests through the browser's Fetch API controls.

In plain words
What is it for?
It helps define interception rules, change outgoing requests, handle paused requests, and manage request interception.
Why use it?
It allows browser traffic to be paused, inspected, modified, or continued as needed.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/yurilopes/pydoll-mcp-server/fetch
Clone the repo
git clone --depth 1 https://github.com/yurilopes/pydoll-mcp-server

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fetch

README.md
[![agentmods](https://agentmods.dev/badge/commands/yurilopes/pydoll-mcp-server/fetch.svg)](https://agentmods.dev/commands/yurilopes/pydoll-mcp-server/fetch)
Your own site
<a href="https://agentmods.dev/commands/yurilopes/pydoll-mcp-server/fetch"><img src="https://agentmods.dev/badge/commands/yurilopes/pydoll-mcp-server/fetch.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 851 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00851
Opus 5 $0.00000 $0.00426
Sonnet 5 $0.00000 $0.00170
Haiku 4.5 $0.00000 $0.00085

Measured 4d ago against content hash 4772fd16742b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fetch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

references/pydoll-docs/en/api/commands/fetch.md · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Fetch Commands

Fetch commands provide advanced network request handling and interception capabilities using the Fetch API domain.

Overview

The fetch commands module enables sophisticated network request management, including request modification, response interception, and authentication handling.

::: pydoll.commands.fetch_commands options: show_root_heading: true show_source: false heading_level: 2 filters: - "!^_" - "!^__"

Usage

Fetch commands are used for advanced network interception and request handling:

from pydoll.commands.fetch_commands import enable, request_paused, continue_request
from pydoll.connection.connection_handler import ConnectionHandler

# Enable fetch domain
connection = ConnectionHandler()
await enable(connection, patterns=[{
    "urlPattern": "*",
    "requestStage": "Request"
}])

# Handle paused requests
async def handle_paused_request(request_id, request):
    # Modify request or continue as-is
    await continue_request(connection, request_id=request_id)

Key Functionality

The fetch commands module provides functions for:

Request Interception

  • enable() - Enable fetch domain with patterns
  • disable() - Disable fetch domain
  • continue_request() - Continue intercepted requests
  • fail_request() - Fail requests with specific errors

Request Modification

  • Modify request headers
  • Change request URLs
  • Alter request methods (GET, POST, etc.)
  • Modify request bodies

Response Handling

  • fulfill_request() - Provide custom responses
  • get_response_body() - Get response content
  • Response header modification
  • Response status code control

Authentication

  • continue_with_auth() - Handle authentication challenges
  • Basic authentication support
  • Custom authentication flows

Advanced Features

Pattern-Based Interception

# Intercept specific URL patterns
patterns = [
    {"urlPattern": "*/api/*", "requestStage": "Request"},
    {"urlPattern": "*.js", "requestStage": "Response"},
    {"urlPattern": "https://example.com/*", "requestStage": "Request"}
]

await enable(connection, patterns=patterns)

Read the full file on GitHub · 153 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 153 lines · 0 tokens per session scan A 4772fd16742b

Subscribe to this mod's changes

fetch is a command published in the GitHub repository yurilopes/pydoll-mcp-server (1 stars, last pushed 21d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 851 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.