pylon_delete_tag
Remove tags from the Pylon customer support platform by specifying the tag ID to delete.
Instructions
Delete a tag
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The tag ID to delete |
Implementation Reference
- src/index.ts:567-579 (registration)Registration of the 'pylon_delete_tag' MCP tool, including Zod input schema validation and a thin handler function that delegates to PylonClient.deleteTag and formats the response.server.tool( 'pylon_delete_tag', 'Delete a tag', { id: z.string().describe('The tag ID to delete'), }, async ({ id }) => { const result = await client.deleteTag(id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }, );
- src/pylon-client.ts:412-417 (helper)Core implementation of the deleteTag method in PylonClient class, which performs a DELETE HTTP request to the Pylon API endpoint `/tags/${id}` using the private request method.async deleteTag(id: string): Promise<SingleResponse<{ success: boolean }>> { return this.request<SingleResponse<{ success: boolean }>>( 'DELETE', `/tags/${id}`, ); }
- src/pylon-client.ts:95-100 (schema)TypeScript interface defining the structure of a Tag object used throughout the codebase.export interface Tag { id: string; value: string; object_type: 'account' | 'issue' | 'contact'; hex_color?: string; }
- src/index.ts:570-572 (schema)Zod schema for input validation of the tool, requiring a string 'id' parameter.{ id: z.string().describe('The tag ID to delete'), },
- src/index.ts:573-578 (handler)MCP tool handler function that calls the client method and returns a formatted text response.async ({ id }) => { const result = await client.deleteTag(id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; },