Skip to content

get_page_links omits <link> elements despite its description #517

Open

Description

Summary

get_page_links's description says it extracts "all links from the page" and is "more reliable than DOM queries" (apps/server/src/tools/snapshot.ts:170-172), but it only returns a11y-tree link nodes (anchor elements), never <link rel="alternate">, rel="canonical", or rel="me".

Impact

An agent trusting the tool's own description to find alternate/canonical representations of a page (e.g. a JSON alternate of an HTML page) will get an empty or incomplete result with no indication anything was skipped.

Proposal

Either widen get_page_links to also return <link> elements with a rel attribute, or narrow the tool's description to state it only covers in-body anchors reachable via the accessibility tree.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions