Skip to main content
Glama

get_current_user

Retrieve the current user's details to identify and manage their Carbon Voice account information, enabling personalized interaction and access to voice memos and conversations.

Instructions

Get the current user information.

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": {}, "type": "object" }

Implementation Reference

  • src/server.ts:388-408 (registration)
    Registers the 'get_current_user' MCP tool. The inline handler fetches the current user's information by calling the cvApi.getWhoAmI endpoint using the authentication token from the context. The input schema is empty as no parameters are required.
    server.registerTool( 'get_current_user', { description: 'Get the current user information. ', inputSchema: z.object({}).shape, // Needed in order to have access to authInfo annotations: { readOnlyHint: true, destructiveHint: false, }, }, async (params: unknown, { authInfo }): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await cvApi.getWhoAmI(setCarbonVoiceAuthHeader(authInfo?.token)), ); } catch (error) { logger.error('Error searching users:', { params, error }); return formatToMCPToolResponse(error); } }, );
  • The execution logic (handler) for the get_current_user tool. It extracts the auth token from the context, calls the underlying API's getWhoAmI method, formats the response, and handles errors.
    async (params: unknown, { authInfo }): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await cvApi.getWhoAmI(setCarbonVoiceAuthHeader(authInfo?.token)), ); } catch (error) { logger.error('Error searching users:', { params, error }); return formatToMCPToolResponse(error); } },
  • The input schema for the get_current_user tool, defined as an empty object since the tool requires no input parameters but needs access to authInfo context.
    { description: 'Get the current user information. ', inputSchema: z.object({}).shape, // Needed in order to have access to authInfo

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