Skip to main content
Glama

create_task

Define work types for time tracking by creating tasks that can be assigned to projects, specifying details like name, billable status, and hourly rates.

Instructions

Create a new task that can be assigned to projects for time tracking. Tasks define what type of work is being performed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTask name (required)
billable_by_defaultNoWhether this task is billable by default
default_hourly_rateNoDefault hourly rate for this task
is_defaultNoWhether this is a default task
is_activeNoWhether the task is active

Implementation Reference

  • Implementation of the CreateTaskHandler which executes the tool logic.
    class CreateTaskHandler implements ToolHandler {
      constructor(private readonly config: BaseToolConfig) {}
    
      async execute(args: Record<string, any>): Promise<CallToolResult> {
        try {
          const validatedArgs = validateInput(CreateTaskSchema, args, 'create task');
          logger.info('Creating task via Harvest API');
          const task = await this.config.harvestClient.createTask(validatedArgs);
          
          return {
            content: [{ type: 'text', text: JSON.stringify(task, null, 2) }],
          };
        } catch (error) {
          return handleMCPToolError(error, 'create_task');
        }
      }
  • Input schema validation for creating a task.
    export const CreateTaskSchema = z.object({
      name: z.string().min(1, 'Task name is required'),
      billable_by_default: z.boolean().optional().default(true),
      default_hourly_rate: z.number().min(0).optional(),
      is_default: z.boolean().optional().default(false),
      is_active: z.boolean().optional().default(true),
    });
  • Registration of the 'create_task' tool with its schema definition and handler.
    {
      tool: {
        name: 'create_task',
        description: 'Create a new task that can be assigned to projects for time tracking. Tasks define what type of work is being performed.',
        inputSchema: {
          type: 'object',
          properties: {
            name: { type: 'string', minLength: 1, description: 'Task name (required)' },
            billable_by_default: { type: 'boolean', description: 'Whether this task is billable by default' },
            default_hourly_rate: { type: 'number', minimum: 0, description: 'Default hourly rate for this task' },
            is_default: { type: 'boolean', description: 'Whether this is a default task' },
            is_active: { type: 'boolean', description: 'Whether the task is active' },
          },
          required: ['name'],
          additionalProperties: false,
        },
      },
      handler: new CreateTaskHandler(config),
    },
Behavior2/5

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

With no annotations provided, the description carries full burden. It states this creates a new task but doesn't disclose behavioral traits like required permissions, whether creation is idempotent, rate limits, or what happens on success/failure. The description adds minimal value beyond the obvious 'create' action.

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

Conciseness4/5

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

Two clear sentences with zero waste. The first sentence states the core action and purpose, the second adds context about task definition. However, it could be more front-loaded by immediately distinguishing from sibling tools.

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

Completeness2/5

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

For a creation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after creation (e.g., returns task ID), error conditions, or how this interacts with other entities like projects. The 100% schema coverage helps, but behavioral context is lacking.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description adds no parameter-specific information beyond implying tasks define 'what type of work is being performed' (which loosely relates to the 'name' parameter). Baseline 3 is appropriate when schema does the heavy lifting.

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 verb 'create' and resource 'task', specifying it's for time tracking and project assignment. It distinguishes from siblings like 'create_project' or 'create_time_entry' by focusing on task definition. However, it doesn't explicitly differentiate from 'create_project_task_assignment' which might be related.

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 mentions tasks are 'assigned to projects for time tracking' which provides some context, but offers no explicit guidance on when to use this versus alternatives like 'create_project_task_assignment' or 'update_task'. No prerequisites, exclusions, or comparison with sibling tools are provided.

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

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