Skip to main content
Glama
kaosensei

Intercom Articles MCP Server

by kaosensei

delete_collection

Permanently remove an Intercom Help Center collection and all its contents. Provide the collection ID to delete. Warning: action cannot be undone.

Instructions

Delete an Intercom Help Center collection. WARNING: This action cannot be undone. The collection and all its contents will be permanently removed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCollection ID to delete (required)

Implementation Reference

  • Handler function for delete_collection tool. Extracts the 'id' from args, validates it, then calls callIntercomAPI with a DELETE request to /help_center/collections/{id}. Returns a success message with the result.
    if (name === 'delete_collection') {
      const { id } = args as { id: string };
    
      // 驗證必填欄位
      if (!id) {
        throw new Error('Collection ID is required');
      }
    
      const result = await callIntercomAPI(`/help_center/collections/${id}`, 'DELETE');
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify({
            success: true,
            message: `Collection ${id} has been deleted successfully`,
            ...result
          }, null, 2)
        }]
      };
    }
  • Schema/registration entry for delete_collection in the tools list. Defines inputSchema requiring an 'id' string property.
    {
      name: 'delete_collection',
      description: 'Delete an Intercom Help Center collection. WARNING: This action cannot be undone. The collection and all its contents will be permanently removed.',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'Collection ID to delete (required)'
          }
        },
        required: ['id']
      }
  • src/index.ts:459-471 (registration)
    Tool is registered as part of the ListToolsRequestSchema handler in the tools array, with name 'delete_collection'.
    {
      name: 'delete_collection',
      description: 'Delete an Intercom Help Center collection. WARNING: This action cannot be undone. The collection and all its contents will be permanently removed.',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'Collection ID to delete (required)'
          }
        },
        required: ['id']
      }
  • callIntercomAPI helper function that makes authenticated HTTP requests to the Intercom API. Used by the delete_collection handler to send the DELETE request.
    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();
    }
Behavior5/5

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

Since no annotations are provided, the description carries the full burden and effectively discloses that deletion is irreversible and removes all contents. This is sufficient for a destructive operation.

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?

Two short sentences: the first states the action, the second provides the critical warning. No unnecessary words; each sentence earns its place.

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

Completeness5/5

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

For a single-parameter tool with no output schema, the description completely explains what the tool does and its irreversible nature. No additional information 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?

Schema description coverage is 100% with the parameter described as 'Collection ID to delete (required)'. The description does not add additional meaning beyond what the schema already provides, so a baseline score of 3 is appropriate.

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?

Description clearly states verb 'Delete' and resource 'Intercom Help Center collection', distinguishing it from sibling tools like create_collection, get_collection, list_collections, and update_collection.

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

Usage Guidelines3/5

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

The description warns that the action is permanent and irreversible, implying it should only be used when deletion is intended. However, it does not explicitly mention when not to use it or suggest alternatives like archiving.

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