Skip to main content
Glama

Extract Markdown

extract_markdown

Convert a browser tab’s page into clean Markdown, keeping headings, lists, code, and links while skipping navigation, footers, and ads for readable content extraction.

Instructions

Page → clean MD (Readability + markdownify). DEFAULT for "read this page". Keeps headings/lists/code/links. content_only skips nav/footer/ads (fallback to body). Needs pip install umbra-browser[markdown].

Ex: extract_markdown('t0') → {"_untrusted":true,"markdown":"# Title\n\nlink...","title":"...","source_html_len":4521} Ex: extract_markdown('t0', selector='.main-content', max_chars=50000)

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": {
      "tab_id": "<tab_id>"
    },
    "name": "extract_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
tab_idYes
selectorNo
max_charsNo
content_onlyNo
include_linksNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden well: it names the conversion pipeline, preserves headings/lists/code/links, describes content_only filtering with fallback, and shows an output example including the _untrusted marker. It still omits some edge behavior such as exact error modes or how include_links changes output.

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 compact and front-loaded: the purpose and default status come first, followed by behavioral notes and two concise examples. No sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter extraction tool with an output schema, it provides an output example, dependency note, fallback behavior, and key parameters. The main gap is that tab_id and include_links semantics are not explicitly stated.

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 0%, so the description must compensate. It clarifies selector, max_chars, content_only, and that links are kept, but tab_id and include_links are not explicitly explained beyond appearing in examples or defaults.

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 states a specific transformation (Page → clean MD via Readability + markdownify) and positions it as the DEFAULT for reading a page. This clearly distinguishes it from siblings like extract_text, extract_links, and aria_snapshot by output type and intended default use.

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 explicitly says this is the DEFAULT for "read this page" and explains content_only behavior with a fallback to body. However, it does not explicitly name when to choose extract_text, extract_links, or aria_snapshot instead, leaving some sibling routing implicit.

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