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'],
      },
    },
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the mutation effect ('old token becomes invalid immediately') and outcome ('generate a new one'), but does not cover aspects like error handling, authentication requirements, or rate limits, which are important for a destructive operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded, consisting of two clear sentences that directly explain the tool's action and immediate effect without any wasted words. Every sentence earns its place by conveying essential information efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity as a destructive operation with no annotations or output schema, the description is minimally adequate. It covers the core behavior but lacks details on error cases, return values, or security implications, which would enhance completeness for such a critical tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the parameter 'access_token' well-documented in the schema. The description does not add any additional meaning or context beyond what the schema provides, such as token format or validation rules, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('revoke' and 'generate new one') and resource ('access_token'), distinguishing it from sibling tools like 'telegraph_get_account_info' or 'telegraph_create_account' that perform different operations. It precisely defines the tool's function without being vague or tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as for token rotation or security purposes, nor does it mention prerequisites like needing a valid token. It lacks explicit context for usage, leaving the agent to infer based on the action alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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