Skip to main content
Glama

get_current_user

Retrieve the authenticated user's profile and permissions from Harvest time tracking to verify access and manage time entries.

Instructions

Retrieve the currently authenticated user's profile and permissions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The GetCurrentUserHandler class implements the tool handler logic for 'get_current_user', which calls the Harvest API to retrieve the current user's profile.
    class GetCurrentUserHandler implements ToolHandler {
      constructor(private readonly config: BaseToolConfig) {}
    
      async execute(args: Record<string, any>): Promise<CallToolResult> {
        try {
          logger.info('Fetching current user from Harvest API');
          const user = await this.config.harvestClient.getCurrentUser();
          
          return {
            content: [{ type: 'text', text: JSON.stringify(user, null, 2) }],
          };
        } catch (error) {
          return handleMCPToolError(error, 'get_current_user');
        }
      }
    }
  • Registration definition for the 'get_current_user' tool within the registerUserTools function.
    {
      tool: {
        name: 'get_current_user',
        description: 'Retrieve the currently authenticated user\'s profile and permissions.',
        inputSchema: {
          type: 'object',
          properties: {},
          additionalProperties: false,
        },
      },
      handler: new GetCurrentUserHandler(config),
    },

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/ianaleck/harvest-mcp-server'

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