Skip to main content
Glama

get_article_details

Retrieve detailed information about a specific Dev.to article using its article ID to access content data.

Instructions

Get detailed information about a specific article

Args:
    article_id: The ID of the article to retrieve

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
article_idYes

Implementation Reference

  • server.py:67-77 (handler)
    The handler function for the 'get_article_details' tool. It is registered via the @mcp.tool() decorator, fetches the article data from the Dev.to API using the helper fetch_from_api, and formats the output using format_article_details.
    @mcp.tool()
    async def get_article_details(article_id: int) -> str:
        """
        Get detailed information about a specific article
        
        Args:
            article_id: The ID of the article to retrieve
        """
        article = await fetch_from_api(f"/articles/{article_id}")
        return format_article_details(article)
  • Shared helper function used by get_article_details (and other tools) to perform API requests to Dev.to.
    async def fetch_from_api(path: str, params: dict = None) -> dict:
        """Helper function to fetch data from Dev.to API"""
        async with httpx.AsyncClient() as client:
            url = f"{BASE_URL}{path}"
            response = await client.get(url, params=params, timeout=10.0)
            response.raise_for_status()
            return response.json()
  • Helper function that formats the raw article dictionary into a human-readable markdown string, used by the get_article_details tool.
    def format_article_details(article: dict) -> str:
        """Format a single article with full details"""
        if not article:
            return "Article not found."
        
        title = article.get("title", "Untitled")
        author = article.get("user", {}).get("name", "Unknown Author")
        published_date = article.get("readable_publish_date", "Unknown date")
        body = article.get("body_markdown", "No content available.")
        tags = article.get("tags", "")
        
        result = f"# {title}\n\n"
        result += f"Author: {author}\n"
        result += f"Published: {published_date}\n"
        result += f"Tags: {tags}\n\n"
        result += "## Content\n\n"
        result += body
        
        return result
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. It states the tool retrieves information, implying a read-only operation, but doesn't disclose behavioral traits like error handling, authentication needs, rate limits, or what 'detailed information' entails. This leaves significant gaps for an agent.

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 appropriately sized and front-loaded with the main purpose. The two-sentence structure is efficient, though the 'Args' section is redundant with the schema and could be omitted to improve conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'detailed information' includes, potential errors, or how it differs from similar sibling tools. For a retrieval tool in a context with multiple article-related tools, more context is needed.

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?

The description adds minimal semantics beyond the input schema: it names the parameter ('article_id') and states it's for retrieving an article. However, with 0% schema description coverage, it doesn't compensate by explaining the ID format, constraints, or examples. The baseline is 3 due to the single parameter being straightforward.

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 verb ('Get') and resource ('detailed information about a specific article'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_article_by_id' which likely serves a similar function, preventing a perfect score.

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 such as 'get_article_by_id' or 'search_articles'. It mentions retrieving a specific article but doesn't clarify prerequisites, exclusions, or comparative use cases with siblings.

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/Arindam200/devto-mcp'

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