Skip to main content
Glama

pylon_update_contact

Modify contact details in the Pylon customer support platform, including name, email, account association, avatar, and portal role.

Instructions

Update an existing contact

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe contact ID
nameNoUpdated name
emailNoUpdated email
account_idNoUpdated account association
avatar_urlNoUpdated avatar URL
portal_roleNoUpdated portal role

Implementation Reference

  • Core handler logic for updating a contact via PATCH API request to `/contacts/${id}` using the shared request method.
    async updateContact( id: string, data: Partial<Contact>, ): Promise<SingleResponse<Contact>> { return this.request<SingleResponse<Contact>>( 'PATCH', `/contacts/${id}`, data, ); }
  • Zod schema defining the input parameters for the pylon_update_contact tool.
    id: z.string().describe('The contact ID'), name: z.string().optional().describe('Updated name'), email: z.string().optional().describe('Updated email'), account_id: z.string().optional().describe('Updated account association'), avatar_url: z.string().optional().describe('Updated avatar URL'), portal_role: z .enum(['no_access', 'member', 'admin']) .optional() .describe('Updated portal role'), },
  • src/index.ts:223-243 (registration)
    MCP server tool registration for 'pylon_update_contact', including input schema and thin wrapper handler that delegates to PylonClient.updateContact and formats the response as text.
    server.tool( 'pylon_update_contact', 'Update an existing contact', { id: z.string().describe('The contact ID'), name: z.string().optional().describe('Updated name'), email: z.string().optional().describe('Updated email'), account_id: z.string().optional().describe('Updated account association'), avatar_url: z.string().optional().describe('Updated avatar URL'), portal_role: z .enum(['no_access', 'member', 'admin']) .optional() .describe('Updated portal role'), }, async ({ id, ...data }) => { const result = await client.updateContact(id, data); return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }], }; }, );
  • TypeScript interface defining the Contact object structure used in updateContact.
    export interface Contact { id: string; name: string; email?: string; emails?: string[]; avatar_url?: string; account?: { id: string; name: string }; custom_fields?: object; portal_role?: string; }
  • Shared HTTP request method used by updateContact to perform authenticated API calls.
    private async request<T>( method: string, path: string, body?: object, ): Promise<T> { const url = `${PYLON_API_BASE}${path}`; const headers: Record<string, string> = { Authorization: `Bearer ${this.apiToken}`, 'Content-Type': 'application/json', Accept: 'application/json', }; const response = await fetch(url, { method, headers, body: body ? JSON.stringify(body) : undefined, }); if (!response.ok) { const errorText = await response.text(); throw new Error( `Pylon API error: ${response.status} ${response.statusText} - ${errorText}`, ); } return response.json() as Promise<T>; }

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/JustinBeckwith/pylon-mcp'

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