Skip to main content
Glama

update_person

Modify user details in Webex by providing a unique person ID and updated information. Part of the Webex MCP Server for managing messaging capabilities.

Instructions

Update a person's details in Webex.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
personDetailsYesThe details of the person to update.
personIdYesThe unique identifier for the person to update.

Implementation Reference

  • The asynchronous handler function that executes the tool logic: constructs Webex API URL, filters person details, sends PUT request to update person, handles errors, and returns response.
    const executeFunction = async ({ personId, personDetails }) => { try { // Construct the URL const url = getWebexUrl(`/people/${encodeURIComponent(personId)}?callingData=true&showAllTypes=true&minResponse=true`); // Set up headers for the request const headers = getWebexJsonHeaders(); // Filter out null/undefined avatar field to avoid API errors const filteredPersonDetails = { ...personDetails }; if (filteredPersonDetails.avatar === null || filteredPersonDetails.avatar === undefined) { delete filteredPersonDetails.avatar; } // Perform the fetch request const response = await fetch(url, { method: 'PUT', headers, body: JSON.stringify(filteredPersonDetails) }); // 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 person details:', error); return { error: 'An error occurred while updating person details.' }; } };
  • The apiTool export that registers the 'update_person' tool, linking the handler function and providing the schema definition including parameters and requirements.
    const apiTool = { function: executeFunction, definition: { type: 'function', function: { name: 'update_person', description: 'Update a person\'s details in Webex.', parameters: { type: 'object', properties: { personId: { type: 'string', description: 'The unique identifier for the person to update.' }, personDetails: { type: 'object', description: 'The details of the person to update.' } }, required: ['personId', 'personDetails'] } } } }; export { apiTool };

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