Skip to main content
Glama

create_client

Create a new client for project management and billing in Harvest. Configure client details including name, address, and currency to organize time tracking and invoicing.

Instructions

Create a new client for project management and billing. Requires client name and supports address and currency configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesClient name (required)
is_activeNoWhether the client is active
addressNoClient address
currencyNo3-letter ISO currency code (e.g., USD, EUR)

Implementation Reference

  • Implementation of the CreateClientHandler class which executes the logic for the create_client tool.
    class CreateClientHandler implements ToolHandler {
      constructor(private readonly config: BaseToolConfig) {}
    
      async execute(args: Record<string, any>): Promise<CallToolResult> {
        try {
          const validatedArgs = validateInput(CreateClientSchema, args, 'create client');
          logger.info('Creating client via Harvest API');
          const client = await this.config.harvestClient.createClient(validatedArgs);
          
          return {
            content: [{ type: 'text', text: JSON.stringify(client, null, 2) }],
          };
        } catch (error) {
          return handleMCPToolError(error, 'create_client');
        }
      }
    }
  • Registration of the 'create_client' tool within the registerClientTools function.
    {
      tool: {
        name: 'create_client',
        description: 'Create a new client for project management and billing. Requires client name and supports address and currency configuration.',
        inputSchema: {
          type: 'object',
          properties: {
            name: { type: 'string', minLength: 1, description: 'Client name (required)' },
            is_active: { type: 'boolean', description: 'Whether the client is active' },
            address: { type: 'string', description: 'Client address' },
            currency: { type: 'string', minLength: 3, maxLength: 3, description: '3-letter ISO currency code (e.g., USD, EUR)' },
          },
          required: ['name'],
          additionalProperties: false,
        },
      },
      handler: new CreateClientHandler(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