Skip to main content
Glama
asachs01

Autotask MCP Server

autotask_create_expense_item

Add an expense line item to an existing expense report with details like date, category, amount, and billability options.

Instructions

Create an expense item on an existing expense report

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expenseReportIdYesThe expense report ID to add the item to
descriptionYesLine item description
expenseDateYesDate of expense (YYYY-MM-DD format)
expenseCategoryYesExpense category picklist ID
amountYesExpense amount
companyIdNoAssociated company ID (0 for internal)
haveReceiptNoWhether a receipt is attached
isBillableToCompanyNoWhether billable to company
isReimbursableNoWhether this expense is reimbursable
paymentTypeNoPayment type picklist ID

Implementation Reference

  • Schema definition for autotask_create_expense_item tool, defining input parameters (expenseReportId, description, expenseDate, expenseCategory, amount, companyId, etc.) with required fields.
    // Expense Item tools
    {
      name: 'autotask_create_expense_item',
      description: 'Create an expense item on an existing expense report',
      inputSchema: {
        type: 'object',
        properties: {
          expenseReportId: { type: 'number', description: 'The expense report ID to add the item to' },
          description: { type: 'string', description: 'Line item description' },
          expenseDate: { type: 'string', description: 'Date of expense (YYYY-MM-DD format)' },
          expenseCategory: { type: 'number', description: 'Expense category picklist ID' },
          amount: { type: 'number', description: 'Expense amount' },
          companyId: { type: 'number', description: 'Associated company ID (0 for internal)' },
          haveReceipt: { type: 'boolean', description: 'Whether a receipt is attached' },
          isBillableToCompany: { type: 'boolean', description: 'Whether billable to company' },
          isReimbursable: { type: 'boolean', description: 'Whether this expense is reimbursable' },
          paymentType: { type: 'number', description: 'Payment type picklist ID' }
        },
        required: ['expenseReportId', 'description', 'expenseDate', 'expenseCategory', 'amount']
      }
    },
  • Handler function that maps tool arguments to the Autotask API call for creating an expense item. Translates 'amount' to 'expenseCurrencyExpenseAmount', with defaults for companyId=0, haveReceipt=false, isBillableToCompany=false, isReimbursable=true, paymentType=10.
    // Expense Items
    ['autotask_create_expense_item', async (a) => {
      const id = await s.createExpenseItem({ expenseReportID: a.expenseReportId, description: a.description, expenseDate: a.expenseDate, expenseCategory: a.expenseCategory, expenseCurrencyExpenseAmount: a.amount, companyID: a.companyId ?? 0, haveReceipt: a.haveReceipt ?? false, isBillableToCompany: a.isBillableToCompany ?? false, isReimbursable: a.isReimbursable ?? true, paymentType: a.paymentType ?? 10 });
      return { result: id, message: `Successfully created expense item with ID: ${id}` };
    }],
  • Registration of autotask_create_expense_item in the 'time_and_billing' category's tools list.
    time_and_billing: {
      description: 'Time entries, billing items, and expense management',
      tools: ['autotask_create_time_entry', 'autotask_search_time_entries', 'autotask_search_billing_items', 'autotask_get_billing_item', 'autotask_search_billing_item_approval_levels', 'autotask_get_expense_report', 'autotask_search_expense_reports', 'autotask_create_expense_report', 'autotask_create_expense_item']
  • Service layer helper that calls http.create('ExpenseItems', item) to create the expense item via the Autotask REST API.
    async createExpenseItem(item: Partial<AutotaskExpenseItem>): Promise<number> {
      const http = await this.ensureClient();
      try {
        this.logger.debug('Creating expense item:', item);
        const id = await http.create('ExpenseItems', item);
        this.logger.info(`Expense item created with ID: ${id}`);
        return id;
      } catch (error) {
        this.logger.error('Failed to create expense item:', error);
        throw error;
      }
    }
Behavior2/5

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

No annotations are provided, and the description only states a generic creation action. It does not disclose any behavioral traits such as required permissions, side effects, or constraints (e.g., whether the expense report must exist). The burden of transparency falls entirely on the description, which is insufficient.

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

Conciseness5/5

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

The description is a single sentence that directly conveys the purpose. It is front-loaded with the verb and resource, with no unnecessary words.

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 high schema coverage and lack of output schema, the description is minimally complete for a simple creation tool. However, it lacks context about the necessity of an existing expense report and potential validations, which would be helpful.

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?

The input schema has 100% description coverage, so the schema already explains each parameter's purpose. The description adds no extra meaning beyond what the schema provides. Baseline is 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and the resource ('expense item on an existing expense report'). It distinguishes from sibling tools like autotask_create_expense_report which creates the report itself, making the purpose unambiguous.

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?

No guidance on when to use this tool vs alternatives. It does not mention that an expense report must already exist, nor does it reference any sibling tools for context. The agent is left without decision support.

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

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