Skip to main content
Glama

search_users

Find Carbon Voice users by phone number, email, ID, or name to connect with contacts and manage conversations.

Instructions

Search multiple Users by their phone numbers, email addresses, ids or names. (In order to search Users, you must provide phone numbers, email addresses, ids or names.)When searching by name, only users that are part of your contacts will be returned

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailsNoEmail Addresses
phonesNoPhone Numbers
idsNoUser IDs
namesNoThe names of the users to search for (Only users that are part of your contacts will be returned)

Implementation Reference

  • The handler function for the 'search_users' MCP tool. It takes SearchUsersBody args and authInfo, calls simplifiedApi.searchUsers with auth header, formats the response, and handles errors.
    async (args: SearchUsersBody, { authInfo }): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.searchUsers( args, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error searching users:', { args, error }); return formatToMCPToolResponse(error); } }, );
  • src/server.ts:360-372 (registration)
    The registration of the 'search_users' tool using server.registerTool, including name, description, input schema (searchUsersBody.shape), and annotations.
    server.registerTool( 'search_users', { description: 'Search multiple Users by their phone numbers, email addresses, ids or names. ' + '(In order to search Users, you must provide phone numbers, email addresses, ids or names.)' + 'When searching by name, only users that are part of your contacts will be returned', inputSchema: searchUsersBody.shape, annotations: { readOnlyHint: true, destructiveHint: false, }, },
  • TypeScript interface defining the input schema for search_users: optional arrays of emails, phones, ids, names.
    export interface SearchUsersBody { /** Email Addresses */ emails?: string[]; /** Phone Numbers */ phones?: string[]; /** User IDs */ ids?: string[]; /** The names of the users to search for (Only users that are part of your contacts will be returned) */ names?: string[]; }
  • Generated API client helper function searchUsers that performs a POST request to /simplified/users/search with SearchUsersBody as JSON body, returning User[]. Called by the MCP handler.
    const searchUsers = ( searchUsersBody: SearchUsersBody, options?: SecondParameter<typeof mutator>, ) => { return mutator<User[]>( { url: `/simplified/users/search`, method: 'POST', headers: { 'Content-Type': 'application/json' }, data: searchUsersBody, }, options, ); };

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/PhononX/cv-mcp-server'

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