Skip to main content
Glama

Extract Links

extract_links

Collects visible links from a browser tab, deduplicates shared host URLs into references, and can restrict results to same-origin links.

Instructions

Visible links, columnar + URL footnoting (_refs table dedups host across rows; full URL = _refs[ref] + path). same_origin=True to skip outbound.

Ex: extract_links('t0', same_origin=True) → {"_untrusted":true,"links":[...],"_refs":{"1":"https://x.com"}} where rows=[text,ref,path]

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_links"
  }
}

Input Schema

NameRequiredDescriptionDefault
tab_idYes
max_linksNo
same_originNo
force_refreshNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full disclosure burden. It does add real value by explaining the `_refs` dedup mechanism, the URL reconstruction formula, and the `_untrusted` flag, but it omits read-only/safety framing, whether `force_refresh` triggers navigation, and any pagination/limit behavior.

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?

Dense and front-loaded: the core behavior and the output contract are stated in the first two lines, with a concrete example following. It is terse to the point of strain but has no filler.

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?

An output schema exists, yet the description spends most of its length re-explaining the return shape, while leaving two of four parameters undocumented. For a 4-param tool with no annotations, that allocation is misbalanced.

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

Parameters2/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 document all four parameters. It explains `same_origin` well and shows `tab_id` in the example, but `max_links` (default 80) and `force_refresh` are never mentioned, leaving half the inputs undefined anywhere outside the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ('Visible links') and immediately qualifies the output shape ('columnar + URL footnoting'), which lets an agent distinguish it from text/markdown extraction siblings. It never names those siblings explicitly, so differentiation is implicit rather than stated.

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

Usage Guidelines3/5

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

The only usage signal is 'same_origin=True to skip outbound', which is a parameter behavior rather than a when-to-use rule. There is no guidance on choosing this over extract_text, extract_markdown, or dom_query, so usage context is only implied.

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