Skip to main content
Glama
standardbeagle

Harvest MCP Server

harvest_get_current_user

Retrieve authenticated user details from the Harvest time tracking system to verify identity and access permissions.

Instructions

Get information about the authenticated user. Use about {"tool": "harvest_get_current_user"} for detailed response format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that executes the tool logic by making an authenticated API request to Harvest's /users/me endpoint to retrieve the current user's information.
    async getCurrentUser() {
      return this.makeRequest('/users/me');
    }
  • MCP server dispatcher case for the tool that invokes the HarvestClient method and formats the JSON response.
    case 'harvest_get_current_user':
      const currentUser = await harvestClient.getCurrentUser();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(currentUser, null, 2),
          },
        ],
      };
  • Tool schema definition specifying the name, description, and input schema (no parameters required). This is part of the tools array used for MCP tool listing.
    {
      name: 'harvest_get_current_user',
      description: 'Get information about the authenticated user. Use about {"tool": "harvest_get_current_user"} for detailed response format.',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    },
  • src/index.ts:69-73 (registration)
    Registration of all tools (including harvest_get_current_user) by providing the tools array in response to ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: tools,
      };
    });
  • Helper method used by getCurrentUser to make authenticated HTTP requests to the Harvest API.
    private async makeRequest(endpoint: string, options: RequestInit = {}) {
      const url = `${this.baseUrl}${endpoint}`;
      
      const response = await fetch(url, {
        ...options,
        headers: {
          'Authorization': `Bearer ${this.accessToken}`,
          'Harvest-Account-ID': this.accountId,
          'User-Agent': this.userAgent,
          'Content-Type': 'application/json',
          ...options.headers,
        },
      });
    
      if (!response.ok) {
        let errorMessage = `Harvest API error: ${response.status} ${response.statusText}`;
        
        try {
          const errorBody = await response.json() as any;
          if (errorBody.message) {
            errorMessage += ` - ${errorBody.message}`;
          }
        } catch {
          // If we can't parse the error response, use the basic error message
        }
        
        throw new Error(errorMessage);
      }
    
      return response.json();
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves user information, implying a read-only operation, but doesn't specify authentication requirements, rate limits, error handling, or what 'authenticated user' entails. The mention of 'about' for response format adds some context but is vague and doesn't fully compensate for the lack of annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two sentences, but the second sentence about using 'about' for response format is somewhat vague and could be more directly informative. It's front-loaded with the core purpose, but the additional sentence doesn't fully earn its place by providing clear value, making it slightly inefficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on authentication, response structure, or error cases. Without an output schema, the mention of 'about' for format is helpful but insufficient for full completeness, leaving gaps in understanding the tool's behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, focusing instead on the tool's purpose. This meets the baseline for tools with no parameters, as it doesn't mislead or omit necessary param info.

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 tool's purpose: 'Get information about the authenticated user.' It specifies the verb ('Get') and resource ('authenticated user'), making the action explicit. However, it doesn't distinguish this from sibling tools like 'harvest_list_users' or 'harvest_get_project', which could provide similar user or entity information, so it lacks sibling differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. It mentions using 'about' for response format details, but this is not a usage guideline for selecting this tool over siblings like 'harvest_list_users'. There is no indication of context, prerequisites, or exclusions for using this tool.

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

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

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