Skip to main content
Glama

get_page_info

Extract general page information for web debugging and analysis, including DOM structure, content details, and page properties to support development workflows.

Instructions

Obtém informações gerais sobre a página atual

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the 'get_page_info' tool. It evaluates various page properties like title, URL, dimensions, etc., in the browser context and returns them as JSON.
    export async function handleGetPageInfo(currentPage: Page): Promise<ToolResponse> {
      const info = await currentPage.evaluate((): PageInfo => {
        return {
          title: document.title,
          url: window.location.href,
          domain: window.location.hostname,
          path: window.location.pathname,
          protocol: window.location.protocol,
          referrer: document.referrer,
          characterSet: document.characterSet,
          contentType: document.contentType,
          readyState: document.readyState,
          lastModified: document.lastModified,
          viewport: {
            width: window.innerWidth,
            height: window.innerHeight,
          },
          screen: {
            width: window.screen.width,
            height: window.screen.height,
          },
          documentElement: {
            scrollHeight: document.documentElement.scrollHeight,
            scrollWidth: document.documentElement.scrollWidth,
          },
        };
      });
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(info, null, 2),
          },
        ],
      };
    }
  • Schema definition for the 'get_page_info' tool, specifying no input parameters required.
      name: 'get_page_info',
      description: 'Obtém informações gerais sobre a página atual',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:99-102 (registration)
    Dispatch registration in the main tool handler switch statement, which calls the get_page_info handler.
    case 'get_page_info': {
      const currentPage = await initBrowser();
      return await handleGetPageInfo(currentPage);
    }
  • src/tools.ts:185-191 (registration)
    Tool object in the exported tools array used for MCP tool registration and listing.
      name: 'get_page_info',
      description: 'Obtém informações gerais sobre a página atual',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral context. It doesn't disclose whether this is a read-only operation (implied by 'obtains'), what specific information is returned, potential errors (e.g., no page loaded), or performance characteristics. The vague 'general information' leaves the agent guessing about output format and content.

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?

Extremely concise single sentence in Portuguese that directly states the tool's purpose without fluff. Every word earns its place, and the structure is front-loaded with the core functionality. No redundant information or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Incomplete for a tool with no annotations and no output schema. The description doesn't compensate for missing structured data: it fails to explain what 'general information' includes (e.g., URL, title, dimensions), return format, or error conditions. Given the sibling tools provide specific data types, this vagueness leaves significant gaps for agent understanding.

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?

The tool has zero parameters with 100% schema description coverage, so the schema fully documents the absence of inputs. The description appropriately doesn't waste space discussing parameters, maintaining focus on the tool's purpose. This meets the baseline of 4 for zero-parameter tools.

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 clearly states the tool's purpose as 'obtains general information about the current page' (verb+resource). It distinguishes itself from siblings like get_dom (DOM structure), get_page_source (HTML source), and get_console_logs (console data) by focusing on 'general information.' However, it doesn't specify what constitutes 'general information' (e.g., URL, title, viewport), leaving some 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 explicit guidance on when to use this tool versus alternatives. The description implies it's for page-level information, but doesn't clarify when to choose get_page_info over get_dom (for structural data) or get_page_source (for raw HTML). No mention of prerequisites like requiring a page to be loaded 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/EmmanuelBarbosaMonteiro/mcp-server-browser'

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