Skip to main content
Glama
kaosensei

Intercom Articles MCP Server

by kaosensei

update_article

Update existing Intercom Help Center articles. Supports partial updates for title, body, description, state, author, and multilingual content. Modify only fields you need.

Instructions

Update an existing Intercom Help Center article. Supports partial updates and multilingual content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesArticle ID (required)
titleNoUpdated article title (optional)
bodyNoUpdated article content in HTML format (optional)
descriptionNoUpdated article description (optional)
stateNoUpdated article state (optional)
author_idNoUpdated author ID (optional). Use list_admins to find valid IDs by name.
translated_contentNoUpdated multilingual content. Only provided fields will be updated.

Implementation Reference

  • The handler function for the 'update_article' tool. It destructures the arguments (id, title, body, description, state, author_id, translated_content), validates the required 'id' field, builds a payload with only the provided fields, ensures at least one field is provided, calls the Intercom API via PUT /articles/{id}, and returns the updated article JSON.
    if (name === 'update_article') {
      const { id, title, body, description, state, author_id, translated_content } = args as {
        id: string;
        title?: string;
        body?: string;
        description?: string;
        state?: 'draft' | 'published';
        author_id?: number;
        translated_content?: {
          [locale: string]: {
            title?: string;
            body?: string;
            description?: string;
            state?: 'draft' | 'published';
          }
        }
      };
    
      // 驗證必填欄位
      if (!id) {
        throw new Error('Article ID is required');
      }
    
      // 建構 update payload(只包含提供的欄位)
      const payload: any = {};
    
      if (title) payload.title = title;
      if (body) payload.body = body;
      if (description) payload.description = description;
      if (state) payload.state = state;
      if (author_id) payload.author_id = author_id;
      if (translated_content) payload.translated_content = translated_content;
    
      // 確保至少有一個欄位要更新
      if (Object.keys(payload).length === 0) {
        throw new Error('At least one field must be provided for update');
      }
    
      const article = await callIntercomAPI(`/articles/${id}`, 'PUT', payload);
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(article, null, 2)
        }]
      };
    }
  • The input schema for the 'update_article' tool, registered as part of the ListToolsRequestSchema handler. Defines the 'id' (required), 'title', 'body', 'description', 'state' (enum: draft/published), 'author_id', and 'translated_content' (with locale keys containing title, body, description, state) properties.
    name: 'update_article',
    description: 'Update an existing Intercom Help Center article. Supports partial updates and multilingual content.',
    inputSchema: {
      type: 'object',
      properties: {
        id: {
          type: 'string',
          description: 'Article ID (required)'
        },
        title: {
          type: 'string',
          description: 'Updated article title (optional)'
        },
        body: {
          type: 'string',
          description: 'Updated article content in HTML format (optional)'
        },
        description: {
          type: 'string',
          description: 'Updated article description (optional)'
        },
        state: {
          type: 'string',
          enum: ['draft', 'published'],
          description: 'Updated article state (optional)'
        },
        author_id: {
          type: 'number',
          description: 'Updated author ID (optional). Use list_admins to find valid IDs by name.'
        },
        translated_content: {
          type: 'object',
          description: 'Updated multilingual content. Only provided fields will be updated.',
          additionalProperties: {
            type: 'object',
            properties: {
              title: {
                type: 'string',
                description: 'Updated translated title'
              },
              body: {
                type: 'string',
                description: 'Updated translated content in HTML'
              },
              description: {
                type: 'string',
                description: 'Updated translated description'
              },
              state: {
                type: 'string',
                enum: ['draft', 'published'],
                description: 'Updated translation state'
              }
            }
          }
        }
      },
      required: ['id']
    }
  • src/index.ts:269-270 (registration)
    The tool registration entry in the tools array returned by ListToolsRequestSchema. The 'update_article' tool is listed with its name, description, and inputSchema, making it available to MCP clients.
    {
      name: 'update_article',
  • The callIntercomAPI helper function used by the handler to make the HTTP PUT request to Intercom's API at /articles/{id}.
    async function callIntercomAPI(
      endpoint: string,
      method: 'GET' | 'POST' | 'PUT' | 'DELETE' = 'GET',
      body?: any
    ): Promise<any> {
      const options: RequestInit = {
        method,
        headers: {
          'Authorization': `Bearer ${INTERCOM_TOKEN}`,
          'Accept': 'application/json',
          'Content-Type': 'application/json',
          'Intercom-Version': '2.14'
        }
      };
    
      if (body && (method === 'POST' || method === 'PUT')) {
        options.body = JSON.stringify(body);
      }
    
      const response = await fetch(`${INTERCOM_API_BASE}${endpoint}`, options);
    
      if (!response.ok) {
        const error = await response.text();
        throw new Error(`Intercom API error: ${response.status} - ${error}`);
      }
    
      // Handle 204 No Content response
      if (response.status === 204) {
        return { success: true };
      }
    
      return response.json();
    }
Behavior3/5

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

No annotations are provided, so the description must carry the burden. It adds value by mentioning 'partial updates' and 'multilingual content', but does not disclose aspects like destructive effects, auth requirements, or return format. The behavioral disclosure is adequate but incomplete.

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 a single sentence that is front-loaded with action and resource. It is concise and efficient, though it could be slightly more structured or include a brief usage note.

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

Completeness3/5

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

Given the tool has 7 parameters (including nested translated_content) and no output schema, the description is relatively sparse. It covers the basics but leaves many details to the schema. It is adequate for a familiar tool but incomplete for full autonomous use.

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?

Schema description coverage is 100%, so the baseline is 3. The description's mention of 'partial updates' and 'multilingual content' adds context but does not significantly enhance parameter understanding beyond what the schema already provides.

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 action ('Update'), the resource ('existing Intercom Help Center article'), and adds specificity with 'supports partial updates and multilingual content', distinguishing it from siblings like create_article or delete_article.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for updating existing articles but does not explicitly state when to use it vs alternatives like create_article or delete_article. The context is clear, but no exclusions or alternative guidance are provided.

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/kaosensei/intercom-mcp'

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