get_articles_by_username
Fetch articles authored by a specific user on Dev.to by providing the username as input, enabling quick access to their published content.
Instructions
Get articles written by a specific user
Args:
username: The username of the author
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes |
Implementation Reference
- server.py:78-88 (handler)The handler function for the 'get_articles_by_username' tool. It is registered via the @mcp.tool() decorator. Fetches articles by the given username from the Dev.to API using the helper fetch_from_api and formats the results using format_articles.@mcp.tool() async def get_articles_by_username(username: str) -> str: """ Get articles written by a specific user Args: username: The username of the author """ articles = await fetch_from_api("/articles", params={"username": username}) return format_articles(articles[:10])