search_articles
Find articles on Dev.to by entering search terms to locate relevant content for research, learning, or content discovery.
Instructions
Search for articles on Dev.to
Args:
query: Search term to find articles
page: Page number for pagination (default: 1)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| page | No |
Implementation Reference
- server.py:48-66 (handler)The handler function for the 'search_articles' tool. It is decorated with @mcp.tool(), which registers it in the FastMCP server. Fetches paginated articles from Dev.to API, filters them client-side by searching query in title or description, limits to 10, and formats output using format_articles helper.@mcp.tool() async def search_articles(query: str, page: int = 1) -> str: """ Search for articles on Dev.to Args: query: Search term to find articles page: Page number for pagination (default: 1) """ articles = await fetch_from_api("/articles", params={"page": page}) filtered_articles = [ article for article in articles if query.lower() in article.get("title", "").lower() or query.lower() in article.get("description", "").lower() ] return format_articles(filtered_articles[:10])