Skip to main content
Glama

web_fetch

Fetches a single URL and returns its content. Use this when you have a specific URL in mind — for example, after web.search returns a link you want to read, or when the user pastes a URL.

Modes (extract):

  • 'auto' (default): picks the right mode based on response content type.

  • 'markdown': for HTML pages; returns cleaned markdown plus the page .

  • 'text': for JSON/XML/plaintext APIs; returns the raw decoded body.

  • 'file': for images, PDFs, audio, video, archives, or any binary — ingests the bytes into the user's file storage and returns a file_id you can pass to messages.send (to send as an attachment), agents.add_file (to add to agent knowledge), or files.read.

Use web.fetch (not files.upload) when you need the file_id immediately for the next tool call — files.upload(source_url=…) is async and won't have the file ready in the same turn.

Use web.search (not web.fetch) when you don't have a specific URL yet and need to find one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to fetch (http or https). Must be publicly reachable.
extractNoHow to handle the response: 'auto' (default), 'markdown' (HTML → markdown), 'text' (raw body), or 'file' (ingest as binary, return file_id).auto
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  2. Added
  3. Removed
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare readOnlyHint=false/openWorldHint=false/idempotentHint=false but add little; the description carries the real burden, explaining that 'file' mode ingests bytes into the user's file storage and returns a file_id suitable for messages.send, agents.add_file, or files.read. It also discloses the async behavior of files.upload, a side-effect/comparison detail not captured by any structured field.

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?

Front-loaded verb+resource sentence, then a tight bulleted mode list, then two routing rules. Efficient overall, though the mode semantics partially restate the enum descriptions already in the input schema, which is mild redundancy.

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?

No output schema, so the description appropriately describes return content per mode (cleaned markdown plus title, raw decoded body, file_id) and names the downstream tools that consume the file_id. For a 3-parameter fetch tool this is complete enough for correct invocation.

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 all three parameters are already documented, but the description adds meaning beyond the schema: which mode fits which content type (markdown for HTML, text for JSON/XML APIs, file for binaries) and that markdown mode also returns the page <title>. in_workspace gets no narrative treatment, so it is not a full 5.

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?

Opens with a specific verb+resource ('Fetches a single URL and returns its content') and immediately disambiguates from siblings web.search and files.upload. An agent can tell exactly what this does and what it is not without inspecting the schema.

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

Usage Guidelines5/5

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

Explicit when-to-use ('after web.search returns a link', 'when the user pastes a URL') plus two named alternatives with the selecting condition: use web.search when you lack a URL, use files.upload when the file_id isn't needed this turn. Nothing is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.