Skip to main content
Glama

tool_summarize_page

Extract headings and key sections from web pages to provide structured overviews for developers, enabling quick content analysis without browser switching.

Instructions

Get a quick overview of a page.

Extracts headings and key sections.

Args: url: URL to summarize.

Returns: Page summary with sections.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Implementation of the `summarize_page` function which fetches and formats a page summary.
    async def summarize_page(url: str) -> str:
        """Get a structural summary of a page.
    
        Args:
            url: URL to summarize.
    
        Returns:
            Page summary with sections.
        """
        summary = await _scraper.summarize(url)
    
        lines = [
            f"# Summary: {summary.title}\n",
            f"> Source: {url}\n",
            "## Key Sections\n",
        ]
    
        if not summary.sections:
            lines.append("*No sections found*")
        else:
            for section in summary.sections:
                if section.summary:
                    lines.append(f"- **{section.heading}**: {section.summary}")
                else:
                    lines.append(f"- **{section.heading}**")
    
        return "\n".join(lines)
  • Registration of `tool_summarize_page` as an MCP tool, calling `summarize_page` from `devlens.tools.research`.
    @mcp.tool()
    async def tool_summarize_page(url: str) -> str:
        """Get a quick overview of a page.
    
        Extracts headings and key sections.
    
        Args:
            url: URL to summarize.
    
        Returns:
            Page summary with sections.
        """
        return await summarize_page(url)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'quick overview' and 'extracts headings and key sections,' which implies a read-only, non-destructive operation, but doesn't specify details like rate limits, authentication needs, error handling, or what constitutes 'key sections.' For a tool with zero annotation coverage, this is a significant gap in transparency.

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?

The description is highly concise and well-structured: a brief purpose statement, a bullet point for key actions, and clear sections for Args and Returns. Every sentence earns its place, with no redundant or verbose language, making it easy to scan and understand quickly.

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?

Given the tool's moderate complexity (summarizing web pages), no annotations, and an output schema present, the description is minimally adequate. It covers the purpose and parameter semantics but lacks behavioral details and usage guidelines. The output schema likely handles return values, so the description's brief mention of 'Page summary with sections' is sufficient, but overall completeness is limited.

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 description adds meaningful context for the single parameter 'url' by stating it's the 'URL to summarize,' which clarifies its purpose beyond the schema's type definition. With 0% schema description coverage and only one parameter, the description effectively compensates by providing essential semantics, making it clear what the input represents.

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: 'Get a quick overview of a page' and 'Extracts headings and key sections.' It specifies the verb ('get', 'extracts') and resource ('page', 'headings and key sections'), making it distinct from siblings like tool_scrape_url or tool_deep_dive. However, it doesn't explicitly differentiate from all siblings, such as tool_extract_links, which might also extract page content.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer it over siblings like tool_scrape_url (which might extract raw content) or tool_deep_dive (which might provide more detailed analysis). There's no context on prerequisites, exclusions, or typical use cases, leaving the agent to infer usage from the purpose alone.

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/Y4NN777/devlens-mcp'

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