Skip to main content
Glama

http_patch

Destructive

Send HTTP PATCH requests to partially update web resources. Configure headers, JSON/text body, auth, retries, and timeouts for reliable updates.

Instructions

Perform an HTTP PATCH. Use for partial updates. Spec-wise NOT guaranteed idempotent — depends on the server's patch semantics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesTarget URL (http:// or https://)
bodyNoRaw request body as a string
headersNoExtra request headers as a key/value object
retriesNoRetries on 408/425/429/500/502/503/504 with exponential backoff (default 0)
body_jsonNoRequest body as a JSON value — sets content-type to application/json if none given
max_bytesNoMax response body size in bytes before the body is truncated (default 5MiB, ceiling 100MiB)
basic_authNoHTTP Basic auth credentials
timeout_msNoTimeout in ms for each attempt, covering DNS, every redirect hop and the body (default 10000, max 120000). Retries get a fresh budget; a whole call is capped at 5 minutes.
user_agentNoUser-Agent override (default identifies as @yawlabs/fetch-mcp)
decode_textNoForce text decoding (true) or binary base64 (false). Defaults to auto — text for text/*, json, xml, etc; binary otherwise.
bearer_tokenNoBearer token sent as Authorization: Bearer <token>
content_typeNoContent-Type header to send with the body (e.g. application/json, text/plain, application/x-www-form-urlencoded)
max_redirectsNoMax redirect hops to follow (default 5)
allow_private_hostsNoAllow loopback / private / link-local targets for this call (default false). Refused unless the server operator launched fetch-mcp with FETCH_MCP_ALLOW_PRIVATE_HOSTS=1 -- SSRF protection stays on by default either way.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.0
    • changedInput schema / properties / allow_private_hosts / description
      Previous value: -"Allow requests to loopback / private / link-local addresses. SSRF protection is on by default — only flip this when intentionally talking to localhost."New value: +"Allow loopback / private / link-local targets for this call (default false). Refused unless the server operator launched fetch-mcp with FETCH_MCP_ALLOW_PRIVATE_HOSTS=1 -- SSRF protection stays on by default either way."
    • changedInput schema / properties / timeout_ms / description
      Previous value: -"Request timeout in ms (default 10000, max 120000)"New value: +"Timeout in ms for each attempt, covering DNS, every redirect hop and the body (default 10000, max 120000). Retries get a fresh budget; a whole call is capped at 5 minutes."
  2. First observedv0.6.1

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare idempotentHint=false and destructiveHint=true, so the bar is lower. The description adds genuine value by explaining WHY idempotency isn't guaranteed — "depends on the server's patch semantics" — which is beyond the bare annotation. But it contributes little else: no side-effect scope, auth requirements, or response-behavior disclosure.

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?

Roughly three short clauses — action, usage context, and one critical caveat — with zero filler. The core purpose is front-loaded and every sentence earns its place. This is appropriately sized given that the schema carries all parameter detail.

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 powerful open-world HTTP tool with 14 parameters, nested objects, and no output schema, the description is thin: it omits response-format hints, truncation/error behavior, and explicit when-not-to-use guidance. The unusually rich schema (defaults, bounds, per-param semantics) and annotations compensate substantially, keeping it adequate but not complete.

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%, so the baseline is 3. The description adds nothing about parameters — all 14 (url, body, headers, retries, body_json, allow_private_hosts, etc.) are documented entirely in the schema with defaults and bounds. No bonus, no penalty beyond baseline.

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?

"Perform an HTTP PATCH" states a specific verb and resource, and "Use for partial updates" pins down the exact use case that separates it from siblings like http_put (full replacement) and http_post (creation). The idempotency caveat further differentiates it from http_put, which is conventionally idempotent.

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?

"Use for partial updates" is a direct, clear usage directive, and the idempotency warning functions as a caution against relying on safe retries. However, it never names alternatives (e.g., "use http_put for full replacement") or states explicit exclusions, so it stops short of a 5.

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