Skip to main content
Glama
rcarmo

office-document-mcp-server

by rcarmo

web_extract_links

Read-only

Fetch a web page and extract all hyperlinks. Optionally filter links by regex pattern or restrict to same domain. Useful for discovering related pages or building navigation maps.

Instructions

Extract all links from a web page.

Fetches a page and extracts all hyperlinks, optionally filtering by pattern or domain. Useful for discovering related pages or building navigation maps.

Example: web_extract_links(url="https://docs.microsoft.com/...")

web_extract_links(
    url="https://example.com",
    filter_pattern=r"/docs/",
    same_domain_only=True
)

Args: url: The URL to extract links from filter_pattern: Regex pattern to filter links (optional) same_domain_only: Only return links to the same domain (default: False) timeout: Request timeout in seconds (default: 30)

Returns: Dictionary with extracted links and their text

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to extract links from
filter_patternNoRegex pattern to filter links (optional)
same_domain_onlyNoOnly return links to the same domain (default: False)
timeoutNoRequest timeout in seconds (default: 30)
Behavior4/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false, and the description adds behavioral details like fetching the page, extracting links, and optional filtering. No contradictions, and the description enhances understanding beyond annotations.

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?

The description is well-structured with a clear purpose statement, example usage, and parameter list. It is concise but could be slightly tighter by not repeating schema details.

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?

Given the absence of an output schema, the description adequately explains the return type as a dictionary with links and text. It covers the core functionality and parameters, though it could mention potential error handling or size limitations.

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 schema already documents all parameters. The description repeats this information and adds an example, but does not significantly enhance meaning beyond what the schema provides.

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 explicitly states 'Extract all links from a web page' with a specific verb and resource, and differentiates from sibling tools like web_extract_tables and web_fetch by focusing solely on hyperlink extraction.

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 provides clear context by stating the tool is 'useful for discovering related pages or building navigation maps,' but lacks explicit guidance on when not to use it or alternatives for different tasks.

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/rcarmo/python-office-mcp-server'

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