Skip to main content
Glama
echelon-ai-labs

ServiceNow MCP Server

update_article

Modify knowledge article details including title, category, keywords, short description, and main body text using the article ID in ServiceNow MCP Server.

Instructions

Update an existing knowledge article

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • The core handler function that updates a knowledge article by sending a PATCH request to the ServiceNow kb_knowledge table API.
    def update_article(
        config: ServerConfig,
        auth_manager: AuthManager,
        params: UpdateArticleParams,
    ) -> ArticleResponse:
        """
        Update an existing knowledge article.
    
        Args:
            config: Server configuration.
            auth_manager: Authentication manager.
            params: Parameters for updating the article.
    
        Returns:
            Response with the updated article details.
        """
        api_url = f"{config.api_url}/table/kb_knowledge/{params.article_id}"
    
        # Build request data
        data = {}
    
        if params.title:
            data["short_description"] = params.title
        if params.text:
            data["text"] = params.text
        if params.short_description:
            data["short_description"] = params.short_description
        if params.category:
            data["kb_category"] = params.category
        if params.keywords:
            data["keywords"] = params.keywords
    
        # Make request
        try:
            response = requests.patch(
                api_url,
                json=data,
                headers=auth_manager.get_headers(),
                timeout=config.timeout,
            )
            response.raise_for_status()
    
            result = response.json().get("result", {})
    
            return ArticleResponse(
                success=True,
                message="Article updated successfully",
                article_id=params.article_id,
                article_title=result.get("short_description"),
                workflow_state=result.get("workflow_state"),
            )
    
        except requests.RequestException as e:
            logger.error(f"Failed to update article: {e}")
            return ArticleResponse(
                success=False,
                message=f"Failed to update article: {str(e)}",
            )
  • Pydantic BaseModel defining the input schema/parameters for the update_article tool.
    class UpdateArticleParams(BaseModel):
        """Parameters for updating a knowledge article."""
    
        article_id: str = Field(..., description="ID of the article to update")
        title: Optional[str] = Field(None, description="Updated title of the article")
        text: Optional[str] = Field(None, description="Updated main body text for the article. Field supports html formatting and wiki markup based on the article_type. HTML is the default.")
        short_description: Optional[str] = Field(None, description="Updated short description")
        category: Optional[str] = Field(None, description="Updated category for the article")
        keywords: Optional[str] = Field(None, description="Updated keywords for search")
  • Registration of the 'update_article' tool in the MCP tool definitions dictionary, mapping name to handler, params schema, description, etc.
    "update_article": (
        update_article_tool,
        UpdateArticleParams,
        str,  # Expects JSON string
        "Update an existing knowledge article",
        "json_dict",  # Tool returns Pydantic model
    ),
  • Import of update_article handler from knowledge_base module into tools package __init__.
    from servicenow_mcp.tools.knowledge_base import (
        create_article,
        create_category,
        create_knowledge_base,
        get_article,
        list_articles,
        list_knowledge_bases,
        publish_article,
        update_article,
  • Import alias of the update_article handler used in tool registration.
        update_article as update_article_tool,
    )
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is an update operation (implying mutation), but doesn't describe what happens during update: whether partial updates are allowed (vs. full replacement), what permissions are required, if changes are reversible, or what the response looks like. For a mutation tool with zero annotation coverage, this is a significant gap.

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?

The description is a single, efficient sentence with no wasted words. It's appropriately sized for a basic tool description and front-loads the essential information (update operation on knowledge articles).

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?

For a mutation tool with 1 required parameter (plus 5 optional ones), no annotations, no output schema, and 0% schema description coverage, the description is inadequate. It states what the tool does at a high level but provides no guidance on usage, no parameter information, and minimal behavioral context, leaving significant gaps for an AI agent to use it correctly.

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

Parameters1/5

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

The description provides zero information about parameters beyond what's implied by 'update an existing knowledge article.' With schema description coverage at 0% (no parameter descriptions in the schema), the description fails to compensate. It doesn't mention the required 'article_id' parameter or any of the optional update fields (title, text, category, etc.), leaving all parameters undocumented.

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 'Update an existing knowledge article' clearly states the verb ('update') and resource ('knowledge article'), making the purpose immediately understandable. It distinguishes this from sibling tools like 'create_article' (creation) and 'get_article' (retrieval), though it doesn't explicitly differentiate from other update tools like 'update_catalog_item' or 'update_workflow'.

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. It doesn't mention prerequisites (e.g., needing an existing article ID), when not to use it (e.g., for creating new articles), or how it differs from similar update operations on other resources in the sibling list.

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

Related 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/echelon-ai-labs/servicenow-mcp'

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