Skip to main content
Glama

update_company

Modify company details in Autotask by updating information such as name, contact details, address, and active status using the company ID.

Instructions

Update an existing company in Autotask

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCompany ID to update
companyNameNoCompany name
phoneNoCompany phone number
address1NoCompany address line 1
cityNoCompany city
stateNoCompany state/province
postalCodeNoCompany postal/ZIP code
isActiveNoWhether the company is active

Implementation Reference

  • Core implementation of update_company: calls AutotaskClient.accounts.update to perform the API update
    async updateCompany(id: number, updates: Partial<AutotaskCompany>): Promise<void> { const client = await this.ensureClient(); try { this.logger.debug(`Updating company ${id}:`, updates); await client.accounts.update(id, updates as any); this.logger.info(`Company ${id} updated successfully`); } catch (error) { this.logger.error(`Failed to update company ${id}:`, error); throw error; } }
  • MCP tool handler switch case that invokes the service layer for update_company
    case 'update_company': result = await this.autotaskService.updateCompany(args.id, args); message = `Successfully updated company ID: ${args.id}`; break;
  • Input schema definition for the update_company tool, including parameters and validation
    { name: 'update_company', description: 'Update an existing company in Autotask', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Company ID to update' }, companyName: { type: 'string', description: 'Company name' }, phone: { type: 'string', description: 'Company phone number' }, address1: { type: 'string', description: 'Company address line 1' }, city: { type: 'string', description: 'Company city' }, state: { type: 'string', description: 'Company state/province' }, postalCode: { type: 'string', description: 'Company postal/ZIP code' }, isActive: { type: 'boolean', description: 'Whether the company is active' } }, required: ['id'] } },
  • MCP server registration of tool list handler, which includes update_company via toolHandler.listTools()
    // List available tools this.server.setRequestHandler(ListToolsRequestSchema, async () => { try { this.logger.debug('Handling list tools request'); const tools = await this.toolHandler.listTools(); return { tools }; } catch (error) { this.logger.error('Failed to list tools:', error); throw new McpError( ErrorCode.InternalError, `Failed to list tools: ${error instanceof Error ? error.message : 'Unknown error'}` ); } });
  • MCP server registration of generic tool call handler that routes update_company calls to toolHandler.callTool
    // Call a tool this.server.setRequestHandler(CallToolRequestSchema, async (request) => { try { this.logger.debug(`Handling tool call: ${request.params.name}`); const result = await this.toolHandler.callTool( request.params.name, request.params.arguments || {} ); return { content: result.content, isError: result.isError };

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