pylon_create_issue
Create new support tickets in Pylon with title, HTML content, priority levels, and assignment details for customer issue tracking.
Instructions
Create a new issue/ticket in Pylon
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Title of the issue | |
| body_html | Yes | HTML content of the issue body | |
| account_id | No | Associated account ID | |
| assignee_id | No | User ID to assign the issue to | |
| contact_id | No | Associated contact ID | |
| requester_id | No | Requester contact ID | |
| tags | No | Tags to apply | |
| priority | No | Issue priority |
Implementation Reference
- src/index.ts:321-346 (registration)Registration of the MCP tool 'pylon_create_issue', including description, Zod input schema, and thin handler that delegates to PylonClient.createIssue() and returns formatted JSON response.server.tool( 'pylon_create_issue', 'Create a new issue/ticket in Pylon', { title: z.string().describe('Title of the issue'), body_html: z.string().describe('HTML content of the issue body'), account_id: z.string().optional().describe('Associated account ID'), assignee_id: z .string() .optional() .describe('User ID to assign the issue to'), contact_id: z.string().optional().describe('Associated contact ID'), requester_id: z.string().optional().describe('Requester contact ID'), tags: z.array(z.string()).optional().describe('Tags to apply'), priority: z .enum(['urgent', 'high', 'medium', 'low']) .optional() .describe('Issue priority'), }, async (params) => { const result = await client.createIssue(params); return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }], }; }, );
- src/index.ts:324-339 (schema)Zod schema defining the input parameters for the pylon_create_issue tool.{ title: z.string().describe('Title of the issue'), body_html: z.string().describe('HTML content of the issue body'), account_id: z.string().optional().describe('Associated account ID'), assignee_id: z .string() .optional() .describe('User ID to assign the issue to'), contact_id: z.string().optional().describe('Associated contact ID'), requester_id: z.string().optional().describe('Requester contact ID'), tags: z.array(z.string()).optional().describe('Tags to apply'), priority: z .enum(['urgent', 'high', 'medium', 'low']) .optional() .describe('Issue priority'), },
- src/index.ts:340-345 (handler)Handler function that executes the tool logic by calling PylonClient.createIssue and returning the result as a text content block.async (params) => { const result = await client.createIssue(params); return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }], }; },
- src/pylon-client.ts:290-305 (helper)Core implementation in PylonClient: defines TypeScript parameters and makes POST request to Pylon API /issues endpoint.async createIssue(data: { title: string; body_html: string; account_id?: string; assignee_id?: string; contact_id?: string; requester_id?: string; user_id?: string; tags?: string[]; attachment_urls?: string[]; custom_fields?: object[]; priority?: 'urgent' | 'high' | 'medium' | 'low'; destination_metadata?: object; }): Promise<SingleResponse<Issue>> { return this.request<SingleResponse<Issue>>('POST', '/issues', data); }
- src/pylon-client.ts:55-71 (schema)TypeScript interface defining the structure of an Issue object returned by the API.export interface Issue { id: string; title: string; state: string; priority?: string; body_html?: string; assignee_id?: string; team_id?: string; account_id?: string; contact_id?: string; requester_id?: string; tags?: string[]; created_at?: string; updated_at?: string; customer_portal_visible?: boolean; issue_type?: string; }