Skip to main content
Glama

update_webhook

Modify a Webex webhook by updating its name, target URL, secret, or status using the provided webhook ID. Ensure real-time integration and automation with custom configurations.

Instructions

Update a webhook in Webex.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the webhook.
secretYesThe secret for the webhook.
statusYesThe status of the webhook (e.g., active).
targetUrlYesThe target URL for the webhook.
webhookIdYesThe unique identifier for the webhook.

Implementation Reference

  • The core handler function that executes the update_webhook tool. It constructs the Webex API URL, request body with webhook details, headers (including optional token), performs a PUT fetch request, handles errors, and returns the response or error.
    const executeFunction = async ({ webhookId, name, targetUrl, secret, status }) => {
    
      try {
        // Construct the URL with the webhook ID
        const url = getWebexUrl('/webhooks/${webhookId}');
    
        // Prepare the request body
        const body = JSON.stringify({
          name,
          targetUrl,
          secret,
          ownedBy: 'org',
          status
        });
    
        // Set up headers for the request
        const headers = {
          'Content-Type': 'application/json',
          'Accept': 'application/json'
        };
    
        // If a token is provided, add it to the Authorization header
        if (token) {
          headers['Authorization'] = `Bearer ${token}`;
        }
    
        // Perform the fetch request
        const response = await fetch(url, {
          method: 'PUT',
          headers,
          body
        });
    
        // Check if the response was successful
        if (!response.ok) {
          const errorData = await response.json();
          throw new Error(errorData);
        }
    
        // Parse and return the response data
        const data = await response.json();
        return data;
      } catch (error) {
        console.error('Error updating webhook:', error);
        return { error: 'An error occurred while updating the webhook.' };
      }
    };
  • The JSON schema definition for the update_webhook tool, including name, description, input parameters (webhookId, name, targetUrl, secret, status), and required fields.
        name: 'update_webhook',
        description: 'Update a webhook in Webex.',
        parameters: {
          type: 'object',
          properties: {
            webhookId: {
              type: 'string',
              description: 'The unique identifier for the webhook.'
            },
            name: {
              type: 'string',
              description: 'The name of the webhook.'
            },
            targetUrl: {
              type: 'string',
              description: 'The target URL for the webhook.'
            },
            secret: {
              type: 'string',
              description: 'The secret for the webhook.'
            },
            status: {
              type: 'string',
              description: 'The status of the webhook (e.g., active).'
            }
          },
          required: ['webhookId', 'name', 'event']
        }
      }
    }
  • The apiTool export that packages the handler function and schema definition, intended for registration in the MCP tools registry.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'update_webhook',
          description: 'Update a webhook in Webex.',
          parameters: {
            type: 'object',
            properties: {
              webhookId: {
                type: 'string',
                description: 'The unique identifier for the webhook.'
              },
              name: {
                type: 'string',
                description: 'The name of the webhook.'
              },
              targetUrl: {
                type: 'string',
                description: 'The target URL for the webhook.'
              },
              secret: {
                type: 'string',
                description: 'The secret for the webhook.'
              },
              status: {
                type: 'string',
                description: 'The status of the webhook (e.g., active).'
              }
            },
            required: ['webhookId', 'name', 'event']
          }
        }
      }
    };
    
    export { apiTool };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool updates a webhook, implying a mutation operation, but lacks details on permissions required, whether changes are reversible, rate limits, error conditions, or what the response looks like (no output schema). This leaves significant gaps for an agent to understand the tool's behavior.

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 that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly.

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 complexity of a mutation tool with 5 required parameters, no annotations, and no output schema, the description is insufficient. It lacks critical context such as behavioral traits (e.g., side effects, error handling), usage guidelines, and output details, leaving the agent with incomplete information for proper tool invocation.

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 all 5 parameters clearly documented in the schema (e.g., 'webhookId' as the unique identifier, 'status' as the webhook status). The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage.

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 action ('Update') and resource ('a webhook in Webex'), making the purpose immediately understandable. It distinguishes from siblings like 'create_webhook' and 'delete_webhook' by specifying the update operation, though it doesn't explicitly contrast with other update tools (e.g., 'update_room', 'update_person').

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. The description doesn't mention prerequisites (e.g., needing an existing webhook ID), contrast with 'create_webhook' or 'delete_webhook', or specify typical use cases (e.g., modifying webhook settings after creation).

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/Kashyap-AI-ML-Solutions/webex-messaging-mcp-server'

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