Skip to main content
Glama

browser_fetch

Make HTTPS API calls from the browser extension background, bypassing page CORS and CSP restrictions. Send auth tokens in headers because browser cookies are not included or stored.

Instructions

Make an HTTPS request from the extension background. It is not subject to the page's CORS or CSP, so it works for API calls (Google, Stripe, Slack) where a fetch from the page would be blocked. Your browser cookies are not sent and the answer's cookies are not stored: pass a token in headers. Plain http works only to 127.0.0.1.

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": {
      "url": "<url>"
    },
    "name": "browser_fetch"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesURL to fetch
bodyNoRequest body (for POST/PUT)
methodNoHTTP method (default: GET)
headersNoRequest headers as key-value pairs
partitionNoRun this call in a partition from browser_partition (an id like "p1"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.33.0
    • addedInput schema / properties / partition
      Added value: +{
      +  "description": "Run this call in a partition from browser_partition (an id like \"p1\"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.",
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does substantial work: it discloses the CORS/CSP exemption, that browser cookies are neither sent nor stored, and that credentials must be passed manually in headers. It omits behavior on errors, timeouts, redirects, and what the response contains, which are meaningful gaps for a request tool.

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, zero filler: capability first, then the practical use case, then the cookie/auth caveat and protocol limit. Every sentence adds decision-relevant information.

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 5-parameter, annotation-free tool with no output schema, the description covers calling constraints well but says nothing about what comes back (status code, body, headers) or how failures surface. Return-value shape is a genuine omission when no output schema exists.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, and the description adds real meaning beyond it: the headers parameter is tied to the auth workaround ("pass a token in headers") and the url parameter is constrained (plain http only to 127.0.0.1). The partition parameter semantics live in the schema and are not duplicated, which is appropriate.

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 first sentence names the specific action (HTTPS request from the extension background), and the second immediately distinguishes it from page-level fetch by explaining the CORS/CSP bypass. An agent can tell this is a raw API-call tool rather than a navigation tool like browser_navigate.

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?

It states the clear use case (API calls to Google, Stripe, Slack that a page fetch would block) and the constraint that plain http only reaches 127.0.0.1. It stops short of naming a sibling to use instead when you need page-context requests or cookie-bearing calls, so the alternative routing is left implicit.

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