pylon_update_issue
Modify existing customer support issues in Pylon by updating status, priority, assignee, tags, visibility, or other fields to track and resolve tickets.
Instructions
Update an existing issue
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The issue ID | |
| state | No | Issue state: new, waiting_on_you, waiting_on_customer, on_hold, closed, or custom | |
| title | No | Updated title | |
| tags | No | Updated tags | |
| assignee_id | No | New assignee user ID | |
| team_id | No | Team ID to assign to | |
| account_id | No | Updated account ID | |
| priority | No | Updated priority | |
| customer_portal_visible | No | Whether visible in customer portal |
Implementation Reference
- src/index.ts:348-379 (registration)Registers the 'pylon_update_issue' MCP tool, including input schema (zod object) and thin handler that delegates to PylonClient.updateIssue and formats response.
server.tool( 'pylon_update_issue', 'Update an existing issue', { id: z.string().describe('The issue ID'), state: z .string() .optional() .describe( 'Issue state: new, waiting_on_you, waiting_on_customer, on_hold, closed, or custom', ), title: z.string().optional().describe('Updated title'), tags: z.array(z.string()).optional().describe('Updated tags'), assignee_id: z.string().optional().describe('New assignee user ID'), team_id: z.string().optional().describe('Team ID to assign to'), account_id: z.string().optional().describe('Updated account ID'), priority: z .enum(['urgent', 'high', 'medium', 'low']) .optional() .describe('Updated priority'), customer_portal_visible: z .boolean() .optional() .describe('Whether visible in customer portal'), }, async ({ id, ...data }) => { const result = await client.updateIssue(id, data); return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }], }; }, ); - src/pylon-client.ts:307-321 (handler)Core implementation of issue update: performs PATCH request to Pylon API endpoint `/issues/{id}` with the provided data using the generic request method.
async updateIssue( id: string, data: { state?: string; title?: string; tags?: string[]; assignee_id?: string; team_id?: string; account_id?: string; customer_portal_visible?: boolean; priority?: 'urgent' | 'high' | 'medium' | 'low'; }, ): Promise<SingleResponse<Issue>> { return this.request<SingleResponse<Issue>>('PATCH', `/issues/${id}`, data); } - src/index.ts:351-372 (schema)Zod schema for input validation of the pylon_update_issue tool parameters.
{ id: z.string().describe('The issue ID'), state: z .string() .optional() .describe( 'Issue state: new, waiting_on_you, waiting_on_customer, on_hold, closed, or custom', ), title: z.string().optional().describe('Updated title'), tags: z.array(z.string()).optional().describe('Updated tags'), assignee_id: z.string().optional().describe('New assignee user ID'), team_id: z.string().optional().describe('Team ID to assign to'), account_id: z.string().optional().describe('Updated account ID'), priority: z .enum(['urgent', 'high', 'medium', 'low']) .optional() .describe('Updated priority'), customer_portal_visible: z .boolean() .optional() .describe('Whether visible in customer portal'), }, - src/pylon-client.ts:121-147 (helper)Generic HTTP request method used by updateIssue to make authenticated API calls to Pylon.
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>; }