pylon_get_contact
Retrieve a specific contact from the Pylon customer support platform using its unique ID to access contact details and information.
Instructions
Get a specific contact by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The contact ID |
Implementation Reference
- src/index.ts:185-197 (registration)Registration of the 'pylon_get_contact' MCP tool, including input schema (id: string), description, and handler function that delegates to PylonClient.getContact(id) and returns formatted JSON response.server.tool( 'pylon_get_contact', 'Get a specific contact by ID', { id: z.string().describe('The contact ID'), }, async ({ id }) => { const result = await client.getContact(id); return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }], }; }, );
- src/pylon-client.ts:227-229 (handler)Handler in PylonClient that performs the actual API GET request to /contacts/{id}.async getContact(id: string): Promise<SingleResponse<Contact>> { return this.request<SingleResponse<Contact>>('GET', `/contacts/${id}`); }
- src/pylon-client.ts:44-53 (schema)TypeScript interface defining the Contact object structure returned by the API.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; }
- src/index.ts:188-190 (schema)Zod input schema for the tool: requires 'id' string parameter.{ id: z.string().describe('The contact ID'), },