pylon_update_account
Modify account details in the Pylon customer support platform by updating name, domains, owner, tags, or logo.
Instructions
Update an existing account
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The account ID | |
| name | No | New name for the account | |
| domains | No | Updated list of domains | |
| primary_domain | No | Updated primary domain | |
| logo_url | No | Updated logo URL | |
| owner_id | No | Updated owner ID | |
| tags | No | Updated tags |
Implementation Reference
- src/index.ts:101-119 (registration)Registration of the 'pylon_update_account' tool with input schema and handler function that delegates to PylonClient.updateAccountserver.tool( 'pylon_update_account', 'Update an existing account', { id: z.string().describe('The account ID'), name: z.string().optional().describe('New name for the account'), domains: z.array(z.string()).optional().describe('Updated list of domains'), primary_domain: z.string().optional().describe('Updated primary domain'), logo_url: z.string().optional().describe('Updated logo URL'), owner_id: z.string().optional().describe('Updated owner ID'), tags: z.array(z.string()).optional().describe('Updated tags'), }, async ({ id, ...data }) => { const result = await client.updateAccount(id, data); return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }], }; }, );
- src/index.ts:113-118 (handler)MCP tool handler for pylon_update_account, which calls the PylonClient and formats the responseasync ({ id, ...data }) => { const result = await client.updateAccount(id, data); return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }], }; },
- src/index.ts:105-112 (schema)Zod input schema for the pylon_update_account tool parametersid: z.string().describe('The account ID'), name: z.string().optional().describe('New name for the account'), domains: z.array(z.string()).optional().describe('Updated list of domains'), primary_domain: z.string().optional().describe('Updated primary domain'), logo_url: z.string().optional().describe('Updated logo URL'), owner_id: z.string().optional().describe('Updated owner ID'), tags: z.array(z.string()).optional().describe('Updated tags'), },
- src/pylon-client.ts:178-187 (helper)PylonClient.updateAccount method that makes the PATCH API request to update an accountasync updateAccount( id: string, data: Partial<Account>, ): Promise<SingleResponse<Account>> { return this.request<SingleResponse<Account>>( 'PATCH', `/accounts/${id}`, data, ); }
- src/pylon-client.ts:31-42 (schema)TypeScript interface for Account used in updateAccount parameters and responseexport interface Account { id: string; name: string; domains?: string[]; primary_domain?: string; logo_url?: string; owner_id?: string; channels?: object[]; custom_fields?: object; external_ids?: object[]; tags?: string[]; }