Skip to main content
Glama

telegraph_revoke_access_token

Revoke an active access token to invalidate it immediately and generate a new replacement token for enhanced security.

Instructions

Revoke the current access_token and generate a new one. The old token becomes invalid immediately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
access_tokenYesAccess token of the Telegraph account to revoke

Implementation Reference

  • MCP tool handler for 'telegraph_revoke_access_token': validates input using Zod schema and delegates to telegraph.revokeAccessToken client function, returning JSON response.
    case 'telegraph_revoke_access_token': { const input = RevokeAccessTokenSchema.parse(args); const result = await telegraph.revokeAccessToken(input.access_token); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2), }], }; }
  • Core implementation of revokeAccessToken: makes HTTP POST to Telegraph API endpoint '/revokeAccessToken' using the shared apiRequest utility.
    export async function revokeAccessToken(access_token: string): Promise<Account> { return apiRequest<Account>('revokeAccessToken', { access_token, }); }
  • Zod input validation schema for the telegraph_revoke_access_token tool requiring 'access_token' string.
    export const RevokeAccessTokenSchema = z.object({ access_token: z.string().describe('Access token of the Telegraph account'), });
  • Tool registration in accountTools array: defines name, description, and JSON inputSchema for MCP server registration.
    { name: 'telegraph_revoke_access_token', description: 'Revoke the current access_token and generate a new one. The old token becomes invalid immediately.', inputSchema: { type: 'object' as const, properties: { access_token: { type: 'string', description: 'Access token of the Telegraph account to revoke', }, }, required: ['access_token'], }, },

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/NehoraiHadad/telegraph-mcp'

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