Skip to main content
Glama
daniel-levesque

AWS Documentation MCP Server

recommend

Find related AWS documentation pages by providing a URL. Discover highly rated, new, similar, and journey-based content recommendations to explore additional resources.

Instructions

Get content recommendations for an AWS documentation page.

Usage

This tool provides recommendations for related AWS documentation pages based on a given URL. Use it to discover additional relevant content that might not appear in search results.

Recommendation Types

The recommendations include four categories:

  1. Highly Rated: Popular pages within the same AWS service

  2. New: Recently added pages within the same AWS service - useful for finding newly released features

  3. Similar: Pages covering similar topics to the current page

  4. Journey: Pages commonly viewed next by other users

When to Use

  • After reading a documentation page to find related content

  • When exploring a new AWS service to discover important pages

  • To find alternative explanations of complex concepts

  • To discover the most popular pages for a service

  • To find newly released information by using a service's welcome page URL and checking the New recommendations

Finding New Features

To find newly released information about a service:

  1. Find any page belong to that service, typically you can try the welcome page

  2. Call this tool with that URL

  3. Look specifically at the New recommendation type in the results

Result Interpretation

Each recommendation includes:

  • url: The documentation page URL

  • title: The page title

  • context: A brief description (if available)

Args: ctx: MCP context for logging and error handling url: URL of the AWS documentation page to get recommendations for

Returns: List of recommended pages with URLs, titles, and context

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the AWS documentation page to get recommendations for

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function for the 'recommend' tool. It makes an HTTP GET request to the AWS recommendations API, parses the response using parse_recommendation_results, and returns a list of RecommendationResult objects. Handles errors gracefully by returning error messages in the result format.
    @mcp.tool()
    async def recommend(
        ctx: Context,
        url: str = Field(description='URL of the AWS documentation page to get recommendations for'),
    ) -> List[RecommendationResult]:
        """Get content recommendations for an AWS documentation page.
    
        ## Usage
    
        This tool provides recommendations for related AWS documentation pages based on a given URL.
        Use it to discover additional relevant content that might not appear in search results.
    
        ## Recommendation Types
    
        The recommendations include four categories:
    
        1. **Highly Rated**: Popular pages within the same AWS service
        2. **New**: Recently added pages within the same AWS service - useful for finding newly released features
        3. **Similar**: Pages covering similar topics to the current page
        4. **Journey**: Pages commonly viewed next by other users
    
        ## When to Use
    
        - After reading a documentation page to find related content
        - When exploring a new AWS service to discover important pages
        - To find alternative explanations of complex concepts
        - To discover the most popular pages for a service
        - To find newly released information by using a service's welcome page URL and checking the **New** recommendations
    
        ## Finding New Features
    
        To find newly released information about a service:
        1. Find any page belong to that service, typically you can try the welcome page
        2. Call this tool with that URL
        3. Look specifically at the **New** recommendation type in the results
    
        ## Result Interpretation
    
        Each recommendation includes:
        - url: The documentation page URL
        - title: The page title
        - context: A brief description (if available)
    
        Args:
            ctx: MCP context for logging and error handling
            url: URL of the AWS documentation page to get recommendations for
    
        Returns:
            List of recommended pages with URLs, titles, and context
        """
        url_str = str(url)
        logger.debug(f'Getting recommendations for: {url_str}')
    
        recommendation_url = f'{RECOMMENDATIONS_API_URL}?path={url_str}&session={SESSION_UUID}'
    
        async with httpx.AsyncClient() as client:
            try:
                response = await client.get(
                    recommendation_url,
                    headers={'User-Agent': DEFAULT_USER_AGENT},
                    timeout=30,
                )
            except httpx.HTTPError as e:
                error_msg = f'Error getting recommendations: {str(e)}'
                logger.error(error_msg)
                await ctx.error(error_msg)
                return [RecommendationResult(url='', title=error_msg, context=None)]
    
            if response.status_code >= 400:
                error_msg = f'Error getting recommendations - status code {response.status_code}'
                logger.error(error_msg)
                await ctx.error(error_msg)
                return [
                    RecommendationResult(
                        url='',
                        title=error_msg,
                        context=None,
                    )
                ]
    
            try:
                data = response.json()
            except json.JSONDecodeError as e:
                error_msg = f'Error parsing recommendations: {str(e)}'
                logger.error(error_msg)
                await ctx.error(error_msg)
                return [RecommendationResult(url='', title=error_msg, context=None)]
    
        results = parse_recommendation_results(data)
        logger.debug(f'Found {len(results)} recommendations for: {url_str}')
        return results
  • Pydantic model defining the structure of each recommendation result, used as the return type for the recommend tool. Includes url, title, and optional context.
    class RecommendationResult(BaseModel):
        """Recommendation result from AWS documentation."""
    
        url: str
        title: str
        context: Optional[str] = None
  • Helper function that parses the raw JSON response from the AWS recommendations API into a list of RecommendationResult model instances. Handles different sections: highlyRated, journey, new, and similar.
    def parse_recommendation_results(data: Dict[str, Any]) -> List[RecommendationResult]:
        """Parse recommendation API response into RecommendationResult objects.
    
        Args:
            data: Raw API response data
    
        Returns:
            List of recommendation results
        """
        results = []
    
        # Process highly rated recommendations
        if 'highlyRated' in data and 'items' in data['highlyRated']:
            for item in data['highlyRated']['items']:
                context = item.get('abstract') if 'abstract' in item else None
    
                results.append(
                    RecommendationResult(
                        url=item.get('url', ''), title=item.get('assetTitle', ''), context=context
                    )
                )
    
        # Process journey recommendations (organized by intent)
        if 'journey' in data and 'items' in data['journey']:
            for intent_group in data['journey']['items']:
                intent = intent_group.get('intent', '')
                if 'urls' in intent_group:
                    for url_item in intent_group['urls']:
                        # Add intent as part of the context
                        context = f'Intent: {intent}' if intent else None
    
                        results.append(
                            RecommendationResult(
                                url=url_item.get('url', ''),
                                title=url_item.get('assetTitle', ''),
                                context=context,
                            )
                        )
    
        # Process new content recommendations
        if 'new' in data and 'items' in data['new']:
            for item in data['new']['items']:
                # Add "New content" label to context
                date_created = item.get('dateCreated', '')
                context = f'New content added on {date_created}' if date_created else 'New content'
    
                results.append(
                    RecommendationResult(
                        url=item.get('url', ''), title=item.get('assetTitle', ''), context=context
                    )
                )
    
        # Process similar recommendations
        if 'similar' in data and 'items' in data['similar']:
            for item in data['similar']['items']:
                context = item.get('abstract') if 'abstract' in item else 'Similar content'
    
                results.append(
                    RecommendationResult(
                        url=item.get('url', ''), title=item.get('assetTitle', ''), context=context
                    )
                )
    
        return results
  • FastMCP server instance creation where tools like 'recommend' are registered via decorators.
    mcp = FastMCP(
        'awslabs.aws-documentation-mcp-server',
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior: it returns recommendations in four categories (Highly Rated, New, Similar, Journey), explains what each category means, and details the result structure (URL, title, context). It also clarifies that recommendations are based on the given URL and might include pages not in search results. However, it doesn't mention potential limitations like rate limits or error conditions.

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 well-structured with clear sections (Usage, Recommendation Types, When to Use, Finding New Features, Result Interpretation), making it easy to scan. However, it includes some redundancy (e.g., repeating parameter info in Args/Returns sections) and could be slightly more concise without losing clarity.

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?

Given the tool's moderate complexity (one parameter, no annotations, but with an output schema), the description is highly complete. It explains the tool's purpose, usage scenarios, recommendation categories, how to interpret results, and includes a practical example. With an output schema present, it doesn't need to detail return values extensively, and it provides sufficient context for an agent to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the single 'url' parameter. The description adds minimal value beyond the schema: it repeats the parameter description ('URL of the AWS documentation page to get recommendations for') and provides examples of how to use it (e.g., using a service's welcome page URL). This meets the baseline of 3 when schema coverage is high.

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 clearly states the tool's purpose: 'Get content recommendations for an AWS documentation page' and 'provides recommendations for related AWS documentation pages based on a given URL.' It distinguishes this from sibling tools (read_documentation, search_documentation) by focusing on recommendations rather than reading or searching content.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'After reading a documentation page to find related content,' 'When exploring a new AWS service,' 'To find alternative explanations,' 'To discover the most popular pages,' and 'To find newly released information.' It also includes a specific workflow for finding new features, making it clear when this tool is appropriate versus alternatives.

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/daniel-levesque/aws-documentation-mcp-server'

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