Skip to main content
Glama

pilot_page_links

Extract all links from a webpage as text and URL pairs for automated navigation and content analysis.

Instructions

Get all links on the page as text + href pairs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'pilot_page_links' tool implementation which extracts and formats links from the current browser page.
    server.tool(
      'pilot_page_links',
      'Get all links on the page as text + href pairs.',
      {},
      async () => {
        await bm.ensureBrowser();
        try {
          const links = await bm.getPage().evaluate(() =>
            [...document.querySelectorAll('a[href]')].map(a => ({
              text: a.textContent?.trim().slice(0, 120) || '',
              href: (a as HTMLAnchorElement).href,
            })).filter(l => l.text && l.href)
          );
          const result = links.map(l => `${l.text} → ${l.href}`).join('\n');
          return { content: [{ type: 'text' as const, text: result || '(no links found)' }] };
        } catch (err) {
          return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
        }
      }
    );
Behavior2/5

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

No annotations provided, so description carries full burden. 'Get' implies read-only but does not explicitly confirm safety or idempotency. No disclosure of visibility scope (visible vs hidden links), iframe handling, or URL resolution (absolute vs relative). Only behavioral trait disclosed is the output format.

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?

Single sentence, 9 words. Front-loaded with verb. No redundant phrases. Every word material to understanding the tool's function.

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?

Tool is low complexity (zero params, simple extraction). Without output schema, description partially compensates by mentioning 'text + href pairs' structure. Lacks detail on edge cases (empty result, page not loaded) and exact return type specification (array vs object).

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?

Zero parameters present. Per scoring rules, 0 params yields baseline 4. Description appropriately reflects that no configuration is needed (operates on implicit current page context).

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?

Clear verb ('Get') and resource ('links on the page'), and specifies output format ('text + href pairs'). Distinguishes from siblings like pilot_page_html or pilot_page_text by focusing specifically on anchor elements. Could explicitly mention 'current page' to remove ambiguity.

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

Usage Guidelines2/5

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

No guidance provided on when to use this versus extracting links via pilot_page_html or pilot_evaluate, or whether this includes only visible links vs all DOM links. No prerequisites mentioned (e.g., requiring navigation first).

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/TacosyHorchata/Pilot'

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