Skip to main content
Glama
yshalsager
by yshalsager

fourget_news_search

Read-onlyIdempotent

Retrieve news articles from the 4get meta search engine, including titles, URLs, descriptions, publication dates, and thumbnails. Paginate results using an optional token.

Instructions

Search for news articles using the 4get meta search engine. Returns recent news with titles, URLs, descriptions, publication dates, and thumbnails. Supports pagination via the 'npt' token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
page_tokenNo
engineNoOptional search engine override (maps to 4get "scraper" query parameter).
extra_paramsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'fourget_news_search' - delegates to FourGetClient.news_search() with optional engine/params.
    async def fourget_news_search(
        query: str,
        page_token: str | None = None,
        engine: EngineParam = None,
        extra_params: dict[str, Any] | None = None,
    ) -> dict[str, Any]:
        return await client.news_search(
            query=query,
            page_token=page_token,
            options=combine_options(engine, extra_params),
        )
  • src/server.py:166-173 (registration)
    Registration of the 'fourget_news_search' tool via the @register_tool decorator with description.
    @register_tool(
        name='fourget_news_search',
        description=(
            'Search for news articles using the 4get meta search engine. Returns '
            'recent news with titles, URLs, descriptions, publication dates, and '
            "thumbnails. Supports pagination via the 'npt' token."
        ),
    )
  • FourGetClient.news_search() - the actual implementation that calls _call_search with the 'news' endpoint.
    async def news_search(
        self,
        query: str,
        *,
        page_token: str | None = None,
        options: Mapping[str, Any] | None = None,
    ) -> dict[str, Any]:
        """Search for news articles using the 4get API.
    
        Args:
            query: News search query. Ignored when using page_token.
            page_token: Pagination token from previous response's 'npt' field.
            options: Additional parameters like date range, source filters.
    
        Returns:
            News search response containing:
            - status: "ok" for successful requests
            - news: List of news articles with title, url, description, date
            - npt: Next page token for pagination (if available)
    
        Raises:
            FourGetAuthError: Rate limited or invalid authentication
            FourGetAPIError: API returned non-success status
            FourGetTransportError: Network or HTTP protocol errors
    
        Example:
            >>> result = await client.news_search("artificial intelligence")
            >>> for article in result.get('news', []):
            >>>     print(f"{article['title']} - {article['date']}")
        """
        return await self._call_search('news', query, page_token=page_token, options=options)
  • Helper function used by the handler to combine engine selection with extra parameters.
    def combine_options(
        engine: SearchEngine | None, extras: dict[str, Any] | None
    ) -> dict[str, Any] | None:
        if engine is None and not extras:
            return None
    
        options = dict(extras) if extras else {}
        if engine is not None:
            options['scraper'] = engine.value
        return options
  • Type alias for the optional engine parameter used by fourget_news_search.
    EngineParam = Annotated[
        SearchEngine | None,
        Field(description='Optional search engine override (maps to 4get "scraper" query parameter).'),
    ]
Behavior4/5

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

Annotations already declare readOnly and idempotent. Description adds return field list and pagination mechanism ('npt' token), providing useful behavioral context beyond annotations.

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?

Two concise sentences; no wasted words. Front-loaded with purpose and includes key details.

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?

Provides core purpose and pagination info but omits details on engine and extra_params. Output schema exists but not visible; still, description could be more complete given low parameter documentation.

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

Parameters2/5

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

Schema description coverage is low (25%). Description mentions page_token indirectly via 'npt' but does not explain engine, extra_params, or their purpose. Fails to compensate for low coverage.

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?

Description clearly states 'Search for news articles' using a specific engine, and lists returned fields. Name and description distinguish from sibling tools (image/web search).

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

Usage Guidelines3/5

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

No explicit guidance on when to use vs siblings. While the name implies news context, the description does not state usage conditions or 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/yshalsager/mcp-4get'

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