Skip to main content
Glama

fetch_markdown

Fetches any HTTP/S URL and returns the main article content as clean Markdown. Works best for articles, documentation, and blog posts; supports raw output for non-HTML responses.

Instructions

Fetch a public HTTP/S URL and return its main article content as clean markdown. Best for articles, documentation, blog posts, and reference pages. Non-HTML responses return unsupported_content_type unless raw is set; pure client-rendered SPAs return extraction_failed. Set savePath to write the output to a file instead of returning it inline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawNoReturn the response body verbatim as UTF-8 text (binary is not byte-preserved), skipping Readability and the HTML content-type gate — for JSON, APIs, or raw page source. `MARKFETCH_MAX_BYTES` still applies.
urlYesAbsolute http(s) URL of the page to fetch. The server follows redirects automatically. No authentication headers, cookies, or session state are sent.
savePathNoAbsolute path to write the output to instead of returning it inline; the response becomes a short confirmation. Use when the output might exceed your client's tool-result cap. Relative and `~` paths are rejected. Writes are sandboxed to allowed roots (defaults: system temp dir and the server's working directory; override with `MARKFETCH_ALLOWED_WRITE_ROOTS`) — paths outside return `save_forbidden`. Existing files are overwritten; the parent directory must exist. Fetch errors never touch the file.
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses specific error outcomes (unsupported_content_type, extraction_failed), file-write behavior (overwrites, parent must exist, sandboxing, save_forbidden), and guarantees (fetch errors never touch the file). This is exceptional transparency beyond basic operation.

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?

The description is four sentences, front-loaded with purpose, followed by key behavioral caveats and parameter guidance. Every sentence earns its place; there is no redundancy or filler. It is dense but highly readable.

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?

Even without annotations or an output schema, the description is remarkably complete for a tool of this complexity. It covers purpose, use cases, error conditions (unsupported_content_type, extraction_failed), parameter effects, file-write security, and the raw bypass. No critical ambiguity remains for an agent to invoke it correctly.

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?

The input schema already has 100% coverage with rich descriptions for all three parameters. The description adds meaningful context, such as 'Non-HTML responses return unsupported_content_type unless raw is set' and 'Set savePath to write the output to a file instead of returning it inline,' which reinforces and extends schema semantics. Baseline is 3 due to high coverage; the added value warrants a 4.

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 opens with a specific action ('Fetch a public HTTP/S URL') and a clear output ('main article content as clean markdown'). It lists target use cases (articles, documentation, blog posts, reference pages), which distinguishes it from generic fetch tools. The verb and resource are explicit and unambiguous.

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 via 'Best for articles, documentation, blog posts, and reference pages.' It also implies when to use raw mode ('Non-HTML responses return unsupported_content_type unless raw is set') but does not provide formal when-not-to-use guidance or alternative tool names. This is clear context without exclusions.

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/vasylenko/markfetch'

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