Skip to main content
Glama

browser_links

Extract and classify all navigation links and buttons from a web page by type, returning counts and visibility info. Supports SPA button discovery and optional keyword filtering.

Instructions

Extract all navigation links and buttons from the current page, classify them by type (nav, login, signup, admin, settings, search, logout, help, etc.), and return counts plus visible-area info. Supports SPA button discovery beyond tags.

中文详情:

  • 用途:提取当前页面所有导航链接和按钮,按类型分类(导航/首页/登录/注册/管理/设置/搜索/退出/帮助等),并返回分类统计

  • 何时使用:需要快速了解站点可用入口时;导航测试前枚举链接清单时;验证菜单完整性时;SPA 应用发现按钮路由时

  • 输出:{ ok: boolean, totalLinks: number, totalButtons: number, categories: object, links: array, buttons: array } — 各 link/button 含 selector、text、href、category、visible

  • 参数:

    • filter (string, 可选):关键词筛选,只返回 URL/文本包含该关键词的链接或按钮

    • includeExternal (boolean, 可选):是否包含外部链接,默认 false

    • maxLinks (number, 可选):最大返回链接数,默认 100

  • 错误:浏览器未启动抛出 'Browser not launched';maxLinks 过大可能导致响应变慢

  • 示例:{"filter":"login","includeExternal":false,"maxLinks":100}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNo筛选关键词,只返回URL/文本包含该关键词的链接或按钮(支持SPA按钮文本筛选)
maxLinksNo最大返回链接数,默认100
includeExternalNo是否包含外部链接,默认false
Behavior4/5

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

No annotations provided, so description carries full burden. It mentions error conditions ('Browser not launched') and performance impact of large maxLinks, and describes output structure. It does not disclose side effects, but the tool is read-only.

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 bilingual with English summary and Chinese details, which is verbose but well-structured with sections for when to use, output, parameters, errors, and example. Some redundancy, but overall clear.

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?

Despite no output schema, the description specifies the exact return structure (object with ok, totalLinks, etc.) and covers errors, parameters, and usage scenarios. It is comprehensive for an agent to use 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?

Schema coverage is 100%, but the description adds context: filter supports SPA button text, includeExternal default false, maxLinks default 100. It explains the purpose of each parameter beyond the schema.

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 it extracts all navigation links and buttons, classifies them by type (nav, login, etc.), and returns counts and visibility info. It also notes SPA button discovery beyond <a> tags, distinguishing it from siblings like browser_find or browser_dom.

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 includes a 'when to use' section in Chinese listing scenarios: understanding entry points, enumerating links before testing, verifying menu completeness, and SPA routing. While it lacks explicit exclusions or alternatives, the context is clear.

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/validpilot/ai-verify-mcp'

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