Skip to main content
Glama

pylon_delete_account

Remove a customer account from the Pylon support platform by providing the account ID to delete user data and records.

Instructions

Delete an account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe account ID to delete

Implementation Reference

  • src/index.ts:121-133 (registration)
    Registration of the 'pylon_delete_account' MCP tool, including description, input schema (account ID), and inline handler that calls PylonClient.deleteAccount and returns JSON-formatted result.
    server.tool( 'pylon_delete_account', 'Delete an account', { id: z.string().describe('The account ID to delete'), }, async ({ id }) => { const result = await client.deleteAccount(id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }, );
  • Inline handler function executing the tool logic: deletes the account via client and returns response.
    async ({ id }) => { const result = await client.deleteAccount(id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; },
  • Zod input schema defining the required 'id' parameter.
    { id: z.string().describe('The account ID to delete'), },
  • PylonClient.deleteAccount method: performs authenticated DELETE request to Pylon API endpoint /accounts/{id}.
    async deleteAccount( id: string, ): Promise<SingleResponse<{ success: boolean }>> { return this.request<SingleResponse<{ success: boolean }>>( 'DELETE', `/accounts/${id}`, ); }
  • Private request method in PylonClient used for all API calls, handling authentication, fetch, error handling, and JSON parsing.
    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>; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JustinBeckwith/pylon-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server