Skip to main content
Glama

create_task

Create a new task in Autotask by specifying project ID, title, status, and optional details like description, assigned resource, and time estimates.

Instructions

Create a new task in Autotask

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIDYesProject ID for the task
titleYesTask title
descriptionNoTask description
statusYesTask status (1=New, 2=In Progress, 5=Complete)
assignedResourceIDNoAssigned resource ID
estimatedHoursNoEstimated hours for the task
startDateTimeNoTask start date/time (ISO format)
endDateTimeNoTask end date/time (ISO format)

Implementation Reference

  • Core handler function that performs the actual task creation using the Autotask API client.
    async createTask(task: Partial<AutotaskTask>): Promise<number> { const client = await this.ensureClient(); try { this.logger.debug('Creating task:', task); const result = await client.tasks.create(task as any); const taskId = (result.data as any)?.id; this.logger.info(`Task created with ID: ${taskId}`); return taskId; } catch (error) { this.logger.error('Failed to create task:', error); throw error; } }
  • Input schema definition and tool metadata for the create_task tool, used for validation and documentation.
    { name: 'create_task', description: 'Create a new task in Autotask', inputSchema: { type: 'object', properties: { projectID: { type: 'number', description: 'Project ID for the task' }, title: { type: 'string', description: 'Task title' }, description: { type: 'string', description: 'Task description' }, status: { type: 'number', description: 'Task status (1=New, 2=In Progress, 5=Complete)' }, assignedResourceID: { type: 'number', description: 'Assigned resource ID' }, estimatedHours: { type: 'number', description: 'Estimated hours for the task' }, startDateTime: { type: 'string', description: 'Task start date/time (ISO format)' }, endDateTime: { type: 'string', description: 'Task end date/time (ISO format)' } }, required: ['projectID', 'title', 'status'] } }
  • The listTools method registers the create_task tool by including it in the returned list of available MCP tools.
    ]; this.logger.debug(`Listed ${tools.length} available tools`); return tools; }
  • Dispatch handler in callTool method that routes create_task calls to the autotaskService.createTask method.
    case 'create_task': result = await this.autotaskService.createTask(args); message = `Successfully created task with ID: ${result}`; break;

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/asachs01/autotask-mcp'

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