pylon_redact_message
Remove specific messages from Pylon customer support issues to maintain clean records and protect sensitive information.
Instructions
Redact a message from an issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes | The issue ID | |
| message_id | Yes | The message ID to redact |
Implementation Reference
- src/index.ts:482-495 (registration)Registers the pylon_redact_message MCP tool, including input schema (issue_id, message_id) and thin handler that calls PylonClient.redactMessage and returns JSON response.server.tool( 'pylon_redact_message', 'Redact a message from an issue', { issue_id: z.string().describe('The issue ID'), message_id: z.string().describe('The message ID to redact'), }, async ({ issue_id, message_id }) => { const result = await client.redactMessage(issue_id, message_id); return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }], }; }, );
- src/pylon-client.ts:371-379 (handler)Core handler in PylonClient that performs the API request to redact the specified message in the issue.async redactMessage( issueId: string, messageId: string, ): Promise<SingleResponse<Message>> { return this.request<SingleResponse<Message>>( 'POST', `/issues/${issueId}/messages/${messageId}/redact`, ); }
- src/pylon-client.ts:73-93 (schema)TypeScript interface defining the structure of a Message, used in the response of redactMessage.export interface Message { id: string; message_html: string; author: { avatar_url?: string; name: string; contact?: { email: string; id: string }; user?: { email: string; id: string }; }; is_private: boolean; source: string; thread_id: string; timestamp: string; file_urls?: string[]; email_info?: { from_email: string; to_emails: string[]; cc_emails?: string[]; bcc_emails?: string[]; }; }