Skip to main content
Glama

get_article

Retrieve a specific article from Document360 using its unique ID. Access title, content, tags, and metadata.

Instructions

Get article by ID from Document360

Args: article_id: Document360 article ID (UUID string) ctx: MCP context for logging and error handling

Returns: Article information including title, content, tags, and metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
article_idYesDocument360 article ID (UUID string)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • server.py:57-71 (registration)
    Tool registration with @mcp.tool decorator - defines the get_article tool interface including argument schema (article_id as UUID string), docstring, and delegates to inc/tools.py handler
    @mcp.tool
    async def get_article(
        article_id: Annotated[str, Field(description="Document360 article ID (UUID string)")],
        ctx: Context
    ) -> dict:
        """Get article by ID from Document360
        
        Args:
            article_id: Document360 article ID (UUID string)
            ctx: MCP context for logging and error handling
        
        Returns:
            Article information including title, content, tags, and metadata
        """
        return await tools.get_article(article_id, ctx)
  • Handler function that executes the get_article tool logic - calls the Document360 client, handles logging of success/failure, and manages Document360APIError exceptions with specific error messaging
    async def get_article(article_id: str, ctx: Context) -> Dict[str, Any]:
        """Get article by ID from Document360
        
        Args:
            article_id: Document360 article ID (UUID string)
            ctx: MCP context for logging and error handling
            
        Returns:
            Article data from Document360 API
        """
        try:
            await ctx.info(f"Fetching article with ID: {article_id}")
            
            result = await client.get_article(article_id)
            
            await ctx.info(f"Successfully retrieved article: {result.get('data', {}).get('title', 'Unknown')}")
            return result
            
        except Document360APIError as e:
            await ctx.error(f"Document360 API error: {e.message}")
            if e.status_code == 404:
                await ctx.warning(f"Article {article_id} not found")
            elif e.status_code == 401:
                await ctx.error("Invalid API key - check configuration")
            raise e
        except Exception as e:
            await ctx.error(f"Unexpected error fetching article: {str(e)}")
            raise e
  • API client helper method that makes the actual HTTP GET request to Document360's /v2/Articles/{article_id}/{langcode} endpoint with query params for display mode and publish status
    async def get_article(self, article_id: str) -> Dict[str, Any]:
        """Get article by ID"""
        return await self._request("GET", f"/Articles/{article_id}/{config.langcode}?isForDisplay=false&isPublished={config.only_published}")
  • Configuration schema providing langcode and only_published settings used by the get_article API helper to construct the request URL
    class Config:
        """Configuration for Document360 MCP Server"""
        
        def __init__(self):
            self.api_key = os.getenv("DOCUMENT360_API_KEY", "")
            self.base_url = os.getenv("DOCUMENT360_BASE_URL", "https://apihub.document360.io")
            self.timeout = int(os.getenv("DOCUMENT360_TIMEOUT", "30"))
            self.langcode = os.getenv("DOCUMENT360_LANGCODE", "en")
            self.only_published = os.getenv("DOCUMENT360_ONLYPUBLISHED", "true")
    
        def validate(self) -> bool:
            """Validate configuration"""
            return bool(self.api_key and self.base_url)
        
        @property
        def headers(self) -> dict:
            """Return headers for Document360 API requests"""
            return {
                "api_token": self.api_key,
                "Content-Type": "application/json",
                "User-Agent": "Document360-MCP-Server/1.0"
            }
Behavior3/5

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

The description discloses that it returns article information (title, content, tags, metadata), which is valuable but partially redundant given the output schema. It does not mention potential errors, idempotency, or side effects. With no annotations, the description should provide more behavioral context.

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 brief and front-loaded with the key action. It efficiently lists arguments and return values. However, the 'Args' and 'Returns' sections are a bit verbose; could be more concise.

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

Completeness4/5

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

For a simple tool with one parameter and an output schema, the description covers the essential purpose and return values. It lacks error handling details but is otherwise adequate.

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 repeats the schema's parameter description verbatim ('Document360 article ID (UUID string)') without adding new meaning. Schema coverage is 100%, so baseline is 3, and no extra value is provided.

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 verb ('Get') and resource ('article by ID from Document360'). It distinguishes from sibling tools like 'get_category' and 'search_in_project', which operate on different entities.

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?

No guidance is provided on when to use this tool versus alternatives. For example, it does not mention that 'get_article' is for retrieving a specific article while 'search_in_project' is for finding articles by query.

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/druellan/document360-mcp'

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