Skip to main content
Glama

autotask_update_contract

Partially update an existing Autotask contract by providing its ID and only the fields to modify.

Instructions

Update an existing Contract in Autotask (PATCH). Pass only fields you want to change; everything except id is optional. status: 1=In Effect, 0=Inactive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesContract ID to update
companyIDNoCompany ID
contractNameNoContract name
contractTypeNoContract type picklist ID
contractCategoryNoContract category picklist ID
startDateNoContract start date (ISO YYYY-MM-DD)
endDateNoContract end date (ISO YYYY-MM-DD)
contactIDNoPrimary contact ID
contractNumberNoExternal-facing contract number
contractPeriodTypeNoPeriod type picklist ID
descriptionNoContract description / notes
estimatedCostNoEstimated cost
estimatedHoursNoEstimated hours
estimatedRevenueNoEstimated revenue
setupFeeNoSetup fee amount
overageBillingRateNoOverage billing rate
serviceLevelAgreementIDNoSLA ID
purchaseOrderNumberNoCustomer purchase order number
opportunityIDNoOriginating opportunity ID
billingPreferenceNoBilling preference picklist ID
billToCompanyIDNoBill-to company ID
billToCompanyContactIDNoBill-to contact ID
exclusionContractIDNoExclusion contract ID
isDefaultContractNoWhether this is the default contract for the company
internalCurrencySetupFeeNoSetup fee in internal currency
internalCurrencyOverageBillingRateNoOverage rate in internal currency
organizationalLevelAssociationIDNoOrg level association ID
contractExclusionSetIDNoContract exclusion set ID
renewedContractIDNoID of the contract this renewed
setupFeeBillingCodeIDNoBilling code ID for the setup fee
statusNoContract status (1=In Effect, 0=Inactive)
timeReportingRequiresStartAndStopTimesNoWhether time entries require start/stop times

Implementation Reference

  • Dispatch handler for 'autotask_update_contract' tool in the dispatch table. Calls autotaskService.updateContract(id, rest) with the id extracted from args and all other fields passed as updates.
    ['autotask_update_contract', async (a) => {
      const { id, ...rest } = a;
      await s.updateContract(id, rest); return { result: undefined, message: `Successfully updated contract ID: ${id}` };
    }],
  • Schema definition for 'autotask_update_contract' tool. Defines input schema with all updatable contract fields (id required, all others optional).
      name: 'autotask_update_contract',
      description: 'Update an existing Contract in Autotask (PATCH). Pass only fields you want to change; everything except id is optional. status: 1=In Effect, 0=Inactive.',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'number', description: 'Contract ID to update' },
          companyID: { type: 'number', description: 'Company ID' },
          contractName: { type: 'string', description: 'Contract name' },
          contractType: { type: 'number', description: 'Contract type picklist ID' },
          contractCategory: { type: 'number', description: 'Contract category picklist ID' },
          startDate: { type: 'string', description: 'Contract start date (ISO YYYY-MM-DD)' },
          endDate: { type: 'string', description: 'Contract end date (ISO YYYY-MM-DD)' },
          contactID: { type: 'number', description: 'Primary contact ID' },
          contractNumber: { type: 'string', description: 'External-facing contract number' },
          contractPeriodType: { type: 'number', description: 'Period type picklist ID' },
          description: { type: 'string', description: 'Contract description / notes' },
          estimatedCost: { type: 'number', description: 'Estimated cost' },
          estimatedHours: { type: 'number', description: 'Estimated hours' },
          estimatedRevenue: { type: 'number', description: 'Estimated revenue' },
          setupFee: { type: 'number', description: 'Setup fee amount' },
          overageBillingRate: { type: 'number', description: 'Overage billing rate' },
          serviceLevelAgreementID: { type: 'number', description: 'SLA ID' },
          purchaseOrderNumber: { type: 'string', description: 'Customer purchase order number' },
          opportunityID: { type: 'number', description: 'Originating opportunity ID' },
          billingPreference: { type: 'number', description: 'Billing preference picklist ID' },
          billToCompanyID: { type: 'number', description: 'Bill-to company ID' },
          billToCompanyContactID: { type: 'number', description: 'Bill-to contact ID' },
          exclusionContractID: { type: 'number', description: 'Exclusion contract ID' },
          isDefaultContract: { type: 'boolean', description: 'Whether this is the default contract for the company' },
          internalCurrencySetupFee: { type: 'number', description: 'Setup fee in internal currency' },
          internalCurrencyOverageBillingRate: { type: 'number', description: 'Overage rate in internal currency' },
          organizationalLevelAssociationID: { type: 'number', description: 'Org level association ID' },
          contractExclusionSetID: { type: 'number', description: 'Contract exclusion set ID' },
          renewedContractID: { type: 'number', description: 'ID of the contract this renewed' },
          setupFeeBillingCodeID: { type: 'number', description: 'Billing code ID for the setup fee' },
          status: { type: 'number', description: 'Contract status (1=In Effect, 0=Inactive)' },
          timeReportingRequiresStartAndStopTimes: { type: 'number', description: 'Whether time entries require start/stop times' }
        },
        required: ['id']
      }
    },
  • AutotaskService.updateContract method that performs the actual API call. Delegates to http.update('Contracts', id, updates) which sends a PATCH request to /Contracts with body {id, ...updates}.
    async updateContract(id: number, updates: Partial<AutotaskContract>): Promise<void> {
      const http = await this.ensureClient();
      try {
        this.logger.debug(`Updating contract ${id}:`, updates);
        await http.update('Contracts', id, updates as Record<string, any>);
        this.logger.info(`Contract ${id} updated successfully`);
      } catch (error) {
        this.logger.error(`Failed to update contract ${id}:`, error);
        throw error;
      }
    }
  • Low-level HTTP update helper. Sends PATCH /{Entity} with body {id, ...fields} which is the correct Autotask REST pattern for updates.
    /**
     * PATCH /{Entity} with body `{id, ...fields}`. This is the Autotask update
     * pattern — there is NO PATCH /{Entity}/{id} route (the SDK's default
     * generates one and gets 405 Method Not Allowed for every update).
     */
    async update(entity: string, id: number, body: Record<string, any>): Promise<void> {
      await this.request<void>('PATCH', `/${entity}`, { id, ...body });
    }
Behavior3/5

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

With no annotations, the description must disclose behavior. It indicates a PATCH operation (mutation) and gives one field mapping (status). However, it does not mention permissions, idempotency, return values, or side effects (e.g., whether updating a contract affects related entities). The disclosure is basic but not misleading.

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 extremely concise with two sentences. The first sentence clearly states the purpose and method, and the second provides a usage tip and field hint. Every word is essential, and there is no redundancy.

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 complexity (32 parameters, no output schema, no annotations), the description is minimal. It lacks details on error handling, return values, or prerequisites. The schema compensates for parameter descriptions, but the description could be more complete with examples or behavioral caveats. It is adequate but not thorough.

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 for all 32 parameters, so the schema already provides meaning. The description adds only a helpful mapping for status (1=In Effect, 0=Inactive). This extra information is useful but minor, so the description does not significantly augment the schema.

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 (Update), the resource (existing Contract in Autotask), and the HTTP method (PATCH). The phrase 'pass only fields you want to change' distinguishes it from create tools and other entity updates, ensuring the agent knows this is a partial update operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on how to use the tool: 'Pass only fields you want to change; everything except id is optional.' This clarifies partial update behavior, but it does not explicitly state when to use this tool versus alternatives like autotask_create_contract or autotask_update_company. No exclusions are given, but the context of sibling tools implies it's for existing contracts only.

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

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